Last active
April 1, 2018 13:29
-
-
Save Rahul-Sagore/1f952750cbdf4c1fb411eb6290553ee2 to your computer and use it in GitHub Desktop.
Fizzbuzz output function in Javascript
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
var fizzbuzz = num => { | |
var message = ''; | |
if (num % 3 == 0) message += 'fizz'; | |
if (num % 5 == 0) message += 'buzz'; | |
return message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment