Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What is the shortest fizzbuzz code you can write?
1 point by mappum on July 25, 2012 | hide | past | favorite
Any language is viable, and the snippet must be able to work independently. How few characters can you get it?

I narrowed down my JS fizzbuzz to 64 characters:

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

It uses a global though, Douglas Crockford wouldn't like it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: