Is it possible to start a function over, based on an if statement, in JQuery or Javascript? Something like how return functionname(); is to PHP?
For example
function awesomestuff {
//do stuff;
//do stuff;
if(x == 1) { //start function over }
//do stuff;
//do stuff;
}
I imagine this can be accomplished with an if/else statement, but if the function gets pretty big, it can get pretty messy.
You can use your supplied PHP example of returning the functionname() in JS too, with the exactly same syntax…