One of the great features in Javascript is the Array method that checks if every item satisfies a predicate, known as every.
For example:
const arr = [1, 2, null];
const every = arr.every(item => item !== null); // This will return false as not every item is not-null.
A more concise way to achieve this is by casting an item to a boolean:
const every2 = arr.every(item => Boolean(item)); // This will yield false for values like 0, null, undefined, etc.
An even shorter method involves only passing a Boolean constructor to a callback, which will pass items to its constructor:
const every3 = arr.every(Boolean);
Don't forget to explore other helpful methods such as find and some.
Remember that while these built-in functions do use iteration, JavaScript handles them smoothly under the hood.