<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
i=0;
white(i<=5)
{
document.write("The number is " + i)
document.write("<br>")
i++
}
</script>
<p> Explanation;</p>
<p><b>1<b> equal to 0.</p>
<p>while <b>i</b> is less than, or equal to, 5, the loop will continue to run.</p>
<p><b>i</b> will increase by 1 each time the loop runs.</p>
<script type="text/javascript">
i=0;
do
{
document.write("The number is" + i)
document.write("<br>")
i++
}
while(i<=5)
</script>
<p> Explanation;</p>
<p><b>1<b> equal to 0.</p>
<p> the look will run</p>
<p><b>1</b>will increase by 1 each time the loop runs.</p>
<p>while <b>1</b>is less than, equal to, 5, the loop will continue to run.</p>
</body>
</html>
Không có nhận xét nào:
Đăng nhận xét