Created
July 11, 2019 04:02
-
-
Save numb86/ac348f99f30e42e1e1386b404db345d9 to your computer and use it in GitHub Desktop.
fizzbuzz
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
for (let i = 1; i <= 100; i++) { | |
let result = ''; | |
if (i % 3 === 0) { | |
result += 'FIZZ'; | |
} | |
if (i % 5 === 0) { | |
result += 'BUZZ'; | |
}; | |
console.log(result || i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment