Mega Code Archive

 
Categories / JavaScript DHTML / Language Basics
 

While loop test

<html> <script language="JavaScript"> <!-- function loopTest() {     var index = 1;     while (index <= 12) {           if (index == 6)              break;           index++;     }     document.write("The break statement brings us here."); } loopTest(); //--> </script> </html>