Hacker News new | ask | show | jobs
by hnlmorg 388 days ago
It’s still an extra condition. So it really doesn’t matter if you’re printing “Fizz Buzz” string or not, it’s the same amount of branching.
1 comments

add another bool that stores the information to write a newline whenever either fizz or buzz happen and you don't need the third branch