摘要: 1、多重判断时使用 Array.includes 2、使用默认参数和解构 在JavaScript中我们总是需要检查 null / undefined的值和指定默认值: 我们可以通过声明 默认函数参数 通过默认参数以及解构从而避免判断条件 fruit && fruit.name 我们也需要声明空对象  阅读全文
posted @ 2019-03-01 17:08 Nyan 阅读(223) 评论(0) 推荐(0) 编辑