JavaScript by Patrik

JavaScript Array.some() Method

The some() method of Array instances tests whether at least one element in the array passes the test implemented by the provided function. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise, it returns false. It doesn't modify the array.

Reference: Array.prototype.some() - JavaScript | MDN (mozilla.org)

Comments