Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array.prototype.some( )

function checkPositive(arr) {
  return arr.some(elem => elem > 0);
}
checkPositive([1, 2, 3, -4, 5]);
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+5 =