Answers for "filter array of even numbers"

0

filter array of even numbers

var arr1 = [-200, -163, -26, -4, 0, 7, 76];

var evens = arr1.filter(function(x) {
   return x % 2 === 0;
})

console.log(evens);
Posted by: Guest on March-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language