Returns true if the provided predicate function returns true for at least one element of a set, otherwise it returns false.
any([0, 1, 2, 0], x => x >= 2)// true Copy
any([0, 1, 2, 0], x => x >= 2)// true
1.0.9
the target array
the judgment method
Returns true if the provided predicate function returns true for at least one element of a set, otherwise it returns false.
Example
Since
1.0.9