While loop test : While : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » While »

 

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>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» While