Home / Javascript Tips Generated By ChatGPT / Using Array.every() to Test All Elements in Javascript Check if all elements in an array pass a test. Source Code let ages = [22, 19, 24, 25]; let allAdults = ages.every(function(age) { return age >= 18; }); console.log(allAdults); // true