all
Checks if the provided predicate function returns true
for all elements in a collection.
- Use
Array.prototype.every()
to test if all elements in the collection returntrue
based onfn
. - Omit the second argument,
fn
, to useBoolean
as a default.