View Full Version : equivallent of exit command
jaysa
Mar 11th 2008, 11:06 pm
hai all ,
anyone knows the command used for exiting from a condition other than window.location......
waiting for the response from experts
highborn
Mar 11th 2008, 11:18 pm
close, return, end, quit. :D
vpguy
Mar 12th 2008, 5:54 pm
To terminate a function, use return.
To terminate a loop (for or while), use break.
Examples:
function DoIt(val)
{
var x = 0;
while (true)
{
x++;
if (x > 10) { break; }
}
if (!val) { return; }
// This section will never be reached
// if val contains a false value
}
jaysa
Mar 12th 2008, 9:34 pm
thank you all ...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.