Created
May 30, 2018 03:38
-
-
Save judah-caruso/448469cc068f9a5f973b7fd5d6f7a55d to your computer and use it in GitHub Desktop.
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
function fizz_buzz(num) | |
{ | |
if (num % 15 == 0) { | |
console.log("FizzBuzz"); | |
} else if (num % 5 == 0) { | |
console.log("Buzz"); | |
} else if (num % 3 == 0) { | |
console.log("Fizz"); | |
} else { | |
console.log(num); | |
} | |
} | |
for (var i = 1; i <= 100; i++) | |
{ | |
fizz_buzz(i); | |
} |
Pharserror
commented
May 30, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment