Created
October 21, 2011 11:50
-
-
Save kokudori/1303644 to your computer and use it in GitHub Desktop.
CoffeeScriptでFizzBuzz
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 n in [1..100] | |
console.log switch | |
when n % 15 is 0 | |
'FizzBuzz' | |
when n % 5 is 0 | |
'Buzz' | |
when n % 3 is 0 | |
'Fizz' | |
else | |
n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment