252 B
252 B
all
Returns true if all elements in a collection are truthy, false otherwise.
Use Array.every(Boolean) to test if all elements in the collection are truthy.
const all = arr => arr.every(Boolean);
all([1,2,3]); // true