Use integer variable to control a do-while loop : Do While « Statement « JavaScript Tutorial






<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
var x = 1
do
{
    ++x;
    document.write(x);
}
while (x < 10);
//  -->
</script>
</head>
<body>

</body>
</html>








3.7.Do While
3.7.1.do...while
3.7.2.Do While loop
3.7.3.Use do-while loop and prompt dialog to read user input
3.7.4.Use or (||) in do-while condition
3.7.5.Use integer variable to control a do-while loop