PDA

View Full Version : Halting scripts...


Eternity Angel
09-26-2002, 01:38 PM
I know there is a way to stop a script from executing, but I do not know it. Can anybody tell me...?

Example:

while (something < 12) {
alert('something is ' + something);
something++;
if (something == 6) {
halting thing here
}
}


I know that there are probably tons of tutorials that will tell me this, but I'm asking here first, since here always answers my questions faster...

Vladdy
09-26-2002, 01:42 PM
function foo()
{
.....
if(condition) return;
.....
}

foo();

Eternity Angel
09-26-2002, 01:44 PM
That... Was amazingly simple...

I feel like an idiot now -_-

Thank you for helping me though!!