
array.every() – Checks whether **all** elements pass the test implemented by the callback.
๐ Syntax
bool = array.every((element, index, array) => {
return /* condition */;
}, thisArg);
๐งช Example
const nums=[3,5,8];
console.log(nums.every(n => n > 2)); // true
Comments
Post a Comment