Adscend

Click Here



Click Here

Monday

Do While Loop

Do While Loop

Do while loop allows you to execute an action at least one time no matter if it is true or false. The loop executes round and round while the condition is true. When the condition becomes false, the loop breaks out or terminates of the loop.
Syntax
do
{
// statements that will be executed
}
while(condition)

Example

<script type="text/javascript">
var i=0;
do
{
document.write("This statement will execute only once");
}
while(i!=0)
</script>

Output

This statement will execute only once





No comments:

Post a Comment