Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array some()

const numbers = [45, 4, 9, 16, 25];
let someOver18 = numbers.some(myFunction);

function myFunction(value, index, array) {
  return value > 18;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array
ADD COMMENT
Topic
Name
5+1 =