js vscode 关于对象数组的一个bug

数据结构:

javascript 复制代码
let address = [
    {
        label: "北京市",
        children: []
    },
    {
        label: "天津市",
        children: []
    },
    {
        label: "上海市",
        children: []
    },
    {
        label: "重庆市",
        children: []
    },
    {
        label: "河北省",
        children: [
            {
                label: "石家庄市"
            },
            {
                label: "唐山市"
            },
            {
                label: "秦皇岛市"
            },
            {
                label: "邯郸市"
            },
            {
                label: "邢台市"
            },
            {
                label: "保定市"
            },
            {
                label: "张家口市"
            },
            {
                label: "承德市"
            },
            {
                label: "沧州市"
            },
            {
                label: "廊坊市"
            },
            {
                label: "衡水市"
            }
        ]
    },
   ]

vscode控制台打印结果:

浏览器运行打印结果:

相关推荐
赵民勇11 分钟前
ES5中prototype和prototype.constructor详解
javascript
Van_captain21 分钟前
rn_for_openharmony常用组件_Tabs选项卡
javascript·开源·harmonyos
赵民勇23 分钟前
ES6中的const用法详解
javascript·es6
Van_captain40 分钟前
React Native for OpenHarmony Toast 轻提示组件:自动消失的操作反馈
javascript·开源·harmonyos
Van_captain1 小时前
React Native for OpenHarmony Modal 模态框组件:阻断式交互的设计与实现
javascript·开源·harmonyos
xkxnq1 小时前
第一阶段:Vue 基础入门(第 14天)
前端·javascript·vue.js
前端小臻1 小时前
列举react中类组件和函数组件常用到的方法
前端·javascript·react.js
研☆香1 小时前
html css js文件开发规范
javascript·css·html
赵民勇1 小时前
JavaScript中的this详解(ES5/ES6)
前端·javascript·es6
wayne2141 小时前
React Native 状态管理方案全梳理:Redux、Zustand、React Query 如何选
javascript·react native·react.js