Hacker News new | past | comments | ask | show | jobs | submit login

That's probably the cleaner way to do it, but honestly, the hacked for-loop feels pretty clean too. And it ensures that your firsttime flag is properly set, regardless of how you break out of the loop (a 'continue' in the middle of your example would fail to set the flag properly).



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

Search: