用于查看数组中是否有一个数据匹配条件
const array = ["add", 2, 3, 4, 5];
// checks whether an element is even
const even = (element) =>element.indexOf("add")>=0
console.log(array.some(even));
// expected output: true
const array = ["add", 2, 3, 4, 5];
// checks whether an element is even
const even = (element) =>element.indexOf("add")>=0
console.log(array.some(even));
// expected output: true