
array.some() – Checks whether **at least one** element passes the test implemented by the callback.
๐ Syntax
bool = array.some((element, index, array) => {
return /* true to stop loop */;
}, thisArg);
๐งช Example
const nums=[3,5,8];
console.log(nums.some(n => n > 6)); // true
Comments
Post a Comment