hacktoberfest-2018/code/r00tm4n.js
2018-10-11 05:58:15 +01:00

11 lines
182 B
JavaScript

var even = function (arr) {
var count;
for (var i = 0; i < arr.length; i++) {
if (arr[i]%2 == 0) {
count ++;
}
}
return even;
}
console.log(even([1,2,3,4,5,6,7,8,9,10]));