es6判断数组是否包含某个元素
1 let arr= ['baidu', 'google', 'taobao']; 2 3 console.log(arr.includes('baidu')); //true 4 console.log(arr.includes('baidu1')); //false
1 let arr= ['baidu', 'google', 'taobao']; 2 3 console.log(arr.includes('baidu')); //true 4 console.log(arr.includes('baidu1')); //false