摘要: 如果要判断是否为 null或undefined,通过非空判断即可.const a = { name: 'a' } const b = {} console.log(Object.keys(a).length 0) // false console.log(Object.keys(b).length 阅读全文
posted @ 2024-03-16 10:03 pearlcity 阅读(5) 评论(0) 推荐(0) 编辑