Do While: If the given condition is true/false Do Wile Executes at least once.
Example:
<body>
<script>
t=9;
i=10;
do
{
document.write("<br/>" + t+ " X " + i + " = " + i*t);
i++;
}while(i>12);
</script>
</body>
OutPut:
9 X 10 = 90
Example:
<body>
<script>
t=9;
i=10;
do
{
document.write("<br/>" + t+ " X " + i + " = " + i*t);
i++;
}while(i>12);
</script>
</body>
OutPut:
9 X 10 = 90
No comments:
Post a Comment