Break Statement?

The break statement is used to exit from a loop and transfers the control of execution of the statement after the loop.Consider the following example,

for(i=0;i<10;i++)
{
if(i==5)
{
document.write(" Terminating the Loop...........")
document.write("
")
break
}
}

No comments:

Post a Comment