Last active
February 14, 2019 02:52
-
-
Save rupertbg/d13f73013357ef326ca3e0cf14ca064d to your computer and use it in GitHub Desktop.
Simple JS FizzBuzz Solution
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 (var i = 1; i <= 30; i++) { | |
var output = ""; | |
!(i % 3) ? output += 'fizz' : null; | |
!(i % 5) ? output += 'buzz' : null; | |
output ? console.log(i, output) : null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment