mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-12-22 13:22:39 +00:00
r00tm4ker
This commit is contained in:
parent
9178a27eda
commit
70771bd631
11
code/r00tm4n.js
Normal file
11
code/r00tm4n.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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]));
|
Loading…
Reference in New Issue
Block a user