Home / Javascript Tips Generated By ChatGPT / Using Array.some() to Test If Any Element Passes in Javascript Check if at least one element in an array passes a test. Source Code let ages = [16, 19, 20, 14]; let anyAdults = ages.some(function(age) { return age >= 18; }); console.log(anyAdults); // true