学而时习之,不亦说乎
摘要: 一、可选链操作符let nestedProp = obj && obj.first && obj.first.second; let nestedProp = obj?.first?.second; 二、空位合并操作符let c = a ? a : b // 方式1let c = a || b // 阅读全文
posted @ 2020-12-25 14:44 人生需笑对 阅读(82) 评论(0) 推荐(0) 编辑