JavaScript
Last updated
Was this helpful?
Last updated
Was this helpful?
Array.every repeat till get false otherwise return true
Array.some repeat till false
(If you know C# LINQ , it's like
Any
vsAll
)
some
will return true if any predicate istrue
every
will return true if all predicate istrue
Where predicate means function that returns
bool
( true/false) for each element
every
returns on firstfalse
.some
returns on firsttrue