摘要: 一、可选链操作符?. 可选链操作符?.允许读取位于连接对象链深处的属性值,而不必明确验证链中的每个引用是否有效。 let nestedProp = obj.first && obj.first.second; // 等价于 let nestedProp = obj.first?.second; js 阅读全文
posted @ 2022-07-13 15:02 strongerPian 阅读(138) 评论(0) 推荐(0) 编辑
返回顶端