Created
April 25, 2019 15:17
-
-
Save MelodicCrypter/9f6021db6f115af4a6d31965db0339e7 to your computer and use it in GitHub Desktop.
Clean FizzBuzz code.
This file contains 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 res = ''; | |
if (i % 3 === 0) { res += 'Fizz'; } | |
if (i % 5 === 0) { res += 'Buzz'; } | |
if (res === '') { res = i; } | |
console.log(res); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment