JavaScript pausing execution of function to wait for user input
How do I make my main loop “pause” until an answer has been given by the player using the crane, and then proceed? By breaking it up. The only “yield” in JavaScript on browsers is to let your function end and then arrange to get called back later (via setTimeout, setInterval, an ajax callback, etc.). … Read more