Do While 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>
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