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 returntruebased onfn. - Omit the second argument,
fn, to useBooleanas a default.