<script>
x = 1;
while(x < 10) {
document.write(x +" Mississippi<br>");
x++;
}
</script>
444444444444444444444444444444444444444444444444444444444444444444444444444444444
444444444444444444444444444444444444444444444444444444444444444444444444444444444
<script>
x = 0;
do {
document.write("do<br>wa<br>ditty<br>ditty<br>dum<br>ditty<br>doo<br>");
x++;
} while (x < 7);
</script>
A for loop will execute once, and check to see if the condition is met before executing again. Then it will continue to execute till the condition is through.
No comments:
Post a Comment