Created
January 25, 2017 02:26
-
-
Save keevie/530b1661f6688ef2bdec74e835a1735d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function fizzBuzz(array) { | |
let array_length = array.length; | |
let new_array = [] | |
for (var i = 0; i < array_length; i++) { | |
if ( array[i] % 15 === 0 ) { | |
continue | |
} else if ( array[i] % 5 === 0 ) { | |
new_array.push(array[i]) | |
} else if ( array[i] % 3 === 0 ) { | |
new_array.push(array[i]) | |
} else { | |
continue | |
} | |
} | |
return new_array | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment