Skip to content

Instantly share code, notes, and snippets.

@neur0manc
Created June 19, 2019 07:50
Show Gist options
  • Save neur0manc/759eed762ddfe6aae87c8a4812782c86 to your computer and use it in GitHub Desktop.
Save neur0manc/759eed762ddfe6aae87c8a4812782c86 to your computer and use it in GitHub Desktop.
Eloquent JavasScript Rev.3 :: Chapter 2 :: FizzBuzzExercise
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