function myFunction() {
wait(); //what I put there?
return;
}
myFunction();
//this is an event; when its triggered I want function to resume
onSomething = function() {
myFunction.resume(); //what I put there?
}
Its just a local experience. Note that while(!resume) won't work because that would prevent the event onSomething to happen.