any
Test that at least one element of the array passes the given test.
[2,4,6].any((thisElement) => thisElement == 4); // true
[2,4,7].any((thisElement) => thisElement == 10); // false
Syntax
any(callback)
Returns
A boolean indicating whether at least one element passes the test.
Notes
- The callback is expected to contain ONE parameter.