Skip to content

Instantly share code, notes, and snippets.

@nilsnh
Last active December 13, 2015 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilsnh/4974250 to your computer and use it in GitHub Desktop.
Save nilsnh/4974250 to your computer and use it in GitHub Desktop.
Coffee-script fizzbuzz. Just had to try and make one after reading this: http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
for i in [1..100]
if i % 3 is 0 and i % 5 is 0 then console.log "FizzBuzz"
else if i % 3 is 0 then console.log "Fizz"
else if i % 5 is 0 then console.log "Buzz"
else console.log "#{i}"
@nilsnh
Copy link
Author

nilsnh commented Feb 18, 2013

Aktiv Gist dette her. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment