2020年3月4日

ES6优化javascript的if判断

摘要: 1、使用 Array.includes 来处理多个条件 请看下面的列子: // condition function test(fruit) { if (fruit == 'apple' || fruit == 'strawberry') { console.log('red'); } } 上面的列 阅读全文

posted @ 2020-03-04 08:36 今天的代码你撸了嘛 阅读(3161) 评论(0) 推荐(0) 编辑

导航