Tests whether a collection contains at least n elements which are truthy.
n
false
second argument must be a positive integer
input collection
number of elements
boolean indicating whether a collection contains at least n elements which are truthy
var arr = [ 0, 0, 1, 2, 3 ]; var bool = some( arr, 3 ); // returns true
Tests whether a collection contains at least
n
elements which are truthy.Notes
n
truthy elements.false
.second argument must be a positive integer