Created
May 27, 2013 13:28
-
-
Save CiaraBurkett/5657047 to your computer and use it in GitHub Desktop.
Fizzbuzz version 2 with CoffeeScript
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
# FizzBuzz with CoffeeScript | |
for n in [1..100] | |
if n % 3 is 0 and n % 5 is 0 then console.log "FizzBuzz" | |
else if n % 3 is 0 then console.log "Fizz" | |
else if n % 5 is 0 then console.log "Buzz" | |
else console.log n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment