Array object method (1)

Array object methods

1.Array.protoy.some()

The method is
used to detect whether the elements in the array meet the specified conditions (provided by the function). The
method will execute each element of the array in turn:
if one element meets the condition, the expression returns true, and the remaining elements will not be tested again.
If there is no element that meets the condition, false is returned.

note

some() will not check for empty arrays.
some() will not change the original array.

Learn and post...

Guess you like

Origin blog.csdn.net/jsxiaochen/article/details/108097150