Faking goto in JavaScript


What if I told you JavaScript had a limited form of the infamous goto statement? Surprised? Read on. Labeled Statements It is possible to add label identifiers to JavaScript statements and then use these identifiers with the break and continue statements to manage program flow. While it might be better to use functions instead of labels to jump around, it … Continue reading Faking goto in JavaScript