some and every function

let zz = [11,22,-33];

let allPositve = zz.every(function(value){
return value>=0;
})

console.log(allPositve);

let somePositve = zz.some(function(value){
return value>=0;
})

console.log(somePositve);



node sortingarray.js false true

Comments

Popular posts from this blog

Implicit and Explicit Waits,FluentWait,PageLoadTimeOut

A Interview Questions- selenium