label in JavaScript

Label is used in conjunction with Break or Continue Statement to specify which loop to break or which loop to continue.
General Syntax
break LabelName;
continue LabelName;

Example 1: Usage of Break Statement with Break
<script type="text/javascript">
    <!--
    myLabelA:
       var x = 2+2;
       var y = 5*5;
       document.write("The value of 2+2 is: " + x + "<br>");

       myLabelB:
          for(i=0; i<5; i++){
              document.write("Ths value of i is: " + i + "<br>");
              if(i==2){
                 break myLabelB;
              }
          }
          document.write("I did some more." + "<br>");
          document.write("The value of 5 x 5 is: " + y + "<br>");
    -->
    </script>