Skip to content

Instantly share code, notes, and snippets.

@keevie
Created January 25, 2017 02:26
Show Gist options
  • Save keevie/530b1661f6688ef2bdec74e835a1735d to your computer and use it in GitHub Desktop.
Save keevie/530b1661f6688ef2bdec74e835a1735d to your computer and use it in GitHub Desktop.
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