EVERY And SOME

 let arr=[1,32,45,67];

// EVERY
console.log(arr.every((el)=>( el%2!=0)));

let arr2=[2,4,54,68];
console.log(arr2.every((el)=> el%2==0));

// SOME
console.log(arr.some((el)=> el%2==0));
console.log(arr2.every((el)=>( el%2!=0)));

Comments

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code