Skip to content

Instantly share code, notes, and snippets.

@APARK87
Created May 22, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save APARK87/ba8e3066d29a09a33add to your computer and use it in GitHub Desktop.
Save APARK87/ba8e3066d29a09a33add to your computer and use it in GitHub Desktop.
wk10 quiz
// 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