What if you type in the console something like this?
label: {}
You won't have any errors. This is valid JS!
It turns out you can reference loops in Javascript. This was something I did not know a few days ago, but is a really cool and helpful feature in Javascript. In the following video, I explain you with examples how to use labeled statements.
Top comments (1)
Nice. I was thinking of writing an article on this but you beat me to it!