Did you know that JavaScript has had labels since ES3?!?

in javascript •  7 years ago  (edited)

label - JavaScript MDN

Essentially it is something like goto but only for loops and labeled blocks.

js label

I'm curious to see what's the worst example you can think of using labels?

Or is there by any chance a very useful way to use them?

The possibilities are endless!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Great article