Created
June 19, 2019 07:50
-
-
Save neur0manc/759eed762ddfe6aae87c8a4812782c86 to your computer and use it in GitHub Desktop.
Eloquent JavasScript Rev.3 :: Chapter 2 :: FizzBuzzExercise
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 += 1) { | |
let returnString = "" | |
if (i % 3 === 0) { | |
returnString += "Fizz" | |
} | |
if (i % 5 === 0) { | |
returnString += "Buzz" | |
} | |
console.log(returnString || `${i}`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment