Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you can flip it and save a few bytes, but not valid fizzbuzz then:

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



> but not valid fizzbuzz then

Well, if we let that requirement be broken, I'll present an even shorter JS version:

    1


just thought it was fun. thanks for your reply.




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

Search: