Last active
November 22, 2017 21:28
-
-
Save htkcodes/798f8d0eab8467d0af13e7c1b6bb5e29 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
fizz(500); | |
function fizz(num) { | |
for(let z=1; z<num;z++) | |
{ | |
if(z%15 ===0) console.log('FizzBuzz'); | |
else if (z%3 ===0) console.log('Fizz'); | |
else if(z%5 ===0) console.log('Buzz'); | |
else | |
console.log(z); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment