摘要: const {attr} = obj 等同于 const attr = obj.attr,是ES6用法。 //减少Cannot read property xxx of undefined 类型的错误 //万一你的obj是undefined,如果这样写const attr = obj.attr 就炸 阅读全文
posted @ 2021-06-30 16:54 Fourteen 阅读(103) 评论(0) 推荐(0) 编辑