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

That's not how switches work: a switch can (and will) trigger lots of cases if you don't either `break` (highly unintuitive to new programmers, who like you believe switch is "do one of these") or `return`, either of which cuts cuts the switch short.


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

Search: