Created
May 22, 2015 13:58
-
-
Save APARK87/ba8e3066d29a09a33add to your computer and use it in GitHub Desktop.
wk10 quiz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// given array, indicate all evens and all odds | |
array = [2,3,4,5,6,7,8,9,10,13,15,16,17,19,20,25,26,28,50,51,57,58,72,75,101,207,333,344,367,401,405,788,909] | |
for (x=0; x < array.length; x++){ | |
if( array[x] % 2 == 0 ){ | |
console.log("this is even") | |
}; | |
else{ | |
console.log("odd") | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment