摘要: let a =null; let b = a??[]; console.log(b); //结果 打印[] 用??代替||,用于判断运算符左侧的值为null或undefined时,才返回右侧的值 阅读全文
posted @ 2022-12-14 14:08 热爱前端的5号机器 阅读(60) 评论(0) 推荐(0) 编辑