4 ms·
Javascript already has labels and break and continue. That ought to be enough for everyone.
by Tichy 17y ago
Javascript already has labels and break and continue. That ought to be enough for everyone.
- TallGuyShort 17y agoThe problem with break and continue is that they only apply to the inner most loop. Unless you change certain values, you're only going to reenter the same loop immediately. In that case - goto is actually a cleaner solution.
- Tichy 17y agoThat's what labels are for. I think you can do loop: for(i=0;i<10;i++){ for(...) { break loop; } }