Skip to content

Instantly share code, notes, and snippets.

@remy
Created May 8, 2011 18:40
Show Gist options
  • Save remy/961583 to your computer and use it in GitHub Desktop.
Save remy/961583 to your computer and use it in GitHub Desktop.
fizzbuzz - as short as I can - demo: http://goo.gl/Ssyal
i=0;do console.log(++i%15?i%3?i%5?i:'buzz':'fizz':'fizzbuzz');while(i<100)
@garrow
Copy link

garrow commented May 8, 2011

@ryanseddon You get an extra FizzBuzz at 0.

@cowboy
Copy link

cowboy commented May 9, 2011

FWIW, for(init;condition;) will always be one character less than init;while(condition).. but still, I'd imagine that per the rules, you have to count upwards, from 1 to 100.

@MCalligaris
Copy link

62 chars jsconsole output

for(i=0;++i<101;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz'

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