Array.prototype.includes
Array.prototype.includes()
Array.prototype.includes()let array = [1,2,4,5];
array.includes(2);
// true
array.includes(3);
// false额外用法
let array = [1,3,5,7,9,11];
array.includes(3,1);
// find the number 3 starting from array index 1
// true
array.includes(5,4);
//false
array.includes(1,-1);
// find the number 1 starting from the ending of the array going backwards
// false
array.includes(11,-3);
// true最后更新于