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控制台打印结果:

浏览器运行打印结果:

相关推荐
stpzhf几秒前
记录特别代码样式
前端·javascript·css
本郡主是喵22 分钟前
由于安装nvm 引发的vue : 无法将“vue”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
前端·javascript·vue.js
界面开发小八哥26 分钟前
甘特图组件DHTMLX Gantt中文教程 - 如何实现持久UI状态
javascript·ui·项目管理·甘特图·dhtmlx
托尼沙滩裤31 分钟前
【Vue3】自动化路由配置:Vue3与unplugin-vue-router的完美结合
javascript·vue.js·自动化
这家伙是个好家伙1 小时前
GitHub Copilot Issue in Visual Studio Code “Status Ready (disabled)“
vscode·github·copilot·issue
傻虎贼头贼脑1 小时前
day20JS-axios数据通信
javascript·信息与通信
Mzp风可名喜欢2 小时前
JS手写实现深拷贝
前端·javascript
yiyiy111yiy2 小时前
关于Harmony的学习
前端·javascript·学习·原型模式
小春学渗透2 小时前
DAY14信息打点-JS 架构&框架识别&泄漏提取&API 接口枚举&FUZZ 爬虫&插件项目
开发语言·javascript·爬虫·网络协议·网络安全
自己给自己创造机会3 小时前
css 实现一个卡片
前端·javascript·css