Created
April 10, 2013 17:13
-
-
Save cloneko/5356544 to your computer and use it in GitHub Desktop.
これをCoffeeScriptでやるやり方がいまいちわからん…
(console.logの引数で無名関数を呼び出してごにょる。って奴がわからん…)
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 = 0; i < 1000; i++){ | |
console.log((function (i){ | |
if((i % (3 * 5)) == 0){ | |
return 'FizzBuzz'; | |
} else if(i % 3 == 0){ | |
return 'Fizz'; | |
} else if(i % 5 == 0){ | |
return 'Buzz'; | |
} else { | |
return i; | |
} | |
})(i)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment