Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array some

let array = [1, 2, 3, 4, 5];

//Is any element even?
array.some(function(x) {
  return x % 2 == 0;
}); // true
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #array
ADD COMMENT
Topic
Name
7+8 =