摘要: 1、多重判断时使用Array.includes 例子: function test(fruit) { if (fruit == 'apple' || fruit == 'strawberry') { console.log('red'); } } 对比: function test(fruit) { 阅读全文
posted @ 2020-09-28 11:04 超哥20 阅读(151) 评论(0) 推荐(0) 编辑