Category
true
if every element passed the predicate, false
otherwise
Iterable
every([false], x => x); // false
every([false, true], x => x); // false
every([true], x => x); // true
Category
Determines whether all the elements of an iterable pass a given predicate.
Time complexity: O(n)
Space complexity: O(1)
true
if every element passed the predicate, false
otherwise
Iterable
every([false], x => x); // false
every([false, true], x => x); // false
every([true], x => x); // true
Determines whether all the elements of an iterable pass a given predicate.
Time complexity: O(n)
Space complexity: O(1)