
Array.prototype.some() – Returns **true** once *any* element makes the callback return truthy.
๐ Syntax
const bool = array.some((element, index, array) => {
return /* condition */;
}, thisArg);
๐งช Example
const nums=[2,4,7];
console.log(nums.some(n=>n%2!==0)); // true
Comments
Post a Comment