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.
 
PREVIOUS NEXT
Tagged: #check #items #array #javascript
ADD COMMENT
Topic
Name
1+7 =