Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 16
    I choose to accept this answer because it is simple and can be implemented in an elegant fashion. I absolutely hate GOTO's and consider them bad practice (can open), Ephemient's is too near one. ;o) Commented Oct 8, 2008 at 20:05
  • 18
    IMO, GOTO's are fine as long as they don't break structuring. But to each their own! Commented Oct 10, 2008 at 20:09
  • 55
    Labels on for loops have absolutely nothing in common with GOTO except for their syntax. They are simply a matter to break from outer loops. You do not have any problem with breaking the innermost loop, do you? so why do you have a problem with breaking outer loops? Commented Mar 15, 2014 at 15:12
  • 14
    Please consider accepting the other answer. If not for Andrew Hedges comment (thanks btw.), I would have thought: ah, so javascript does not have that feature. And I bet many in the community might overlook the comment and think just the same. Commented Mar 15, 2014 at 20:38
  • 13
    Why doesn't Stack Overflow have a feature to let the community override the obviously wrong selected answer? :/ Commented Aug 26, 2014 at 23:40