Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check items in array javascript

function checkAllEven(arr) {
  return arr.every(function(x){
	 return	x % 2 === 0
	})
}

//using "every" to check every item in array.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #items #array #javascript
ADD COMMENT
Topic
Name
8+9 =