JavaScript Label — Rarely used JS Concepts

Here is everything you need to know about javascript labels

Photo by Marija Zaric on Unsplash
LabelName: (LabelName can be any user defined thing)
if(1) {
// your code
}
  1. It can be useful when we want to exit from nested loops. (Same for continue)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store