Break - Come Out Of Loop in JavaScript

The break statement will break the loop and continue executing the code that follows after the loop.
Example : Stop Printing On Reaching Roll No 5
 <script type="text/javascript">
     var x="";
 for(i=1;i<=10;i++)
  {
  if(i==5)
    {
    break;
    }
  x =x + "My roll no is " + i + "<br />";
  }
document.write(x);
    </script>

Output
----------
My roll no is 1
My roll no is 2
My roll no is 3
My roll no is 4