0% found this document useful (0 votes)
18 views

Chapter 9 While Loop

The document uses a while loop to count from 0 to 9. It writes the current count value to the page on each iteration, adding a line break. When the count reaches 10, satisfying the condition of the while loop, it writes a message that the while loop has finished.

Uploaded by

shubh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Chapter 9 While Loop

The document uses a while loop to count from 0 to 9. It writes the current count value to the page on each iteration, adding a line break. When the count reaches 10, satisfying the condition of the while loop, it writes a message that the while loop has finished.

Uploaded by

shubh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<html>

<body>

<script type="text/javascript">

var count=0;
document.write("While loop is beginning");
document.write("</br>");

while( count<10)
{
document.write("count = " + count);
document.write("</br>");
count++;
}

document.write("While loop is finished!");


</script>
</body>
</html>

You might also like