Pause JS function from another function
<p>Is there any way I can pause the below set of delayed functions from another function? I want to pause everything for 10 seconds by executing another function.</p>

<p>What I need is something like:</p>

<pre><code>function pause(){
pause sleepLoop() for 10 seconds
}
</code></pre>

<p>If it is not possible to pause the below execution, can I kill it?</p>

<pre><code>function game() {
sleepLoop();
}

function sleepLoop() {
loop...
setTimeout('gameActions()',5000);
}

function gameActions() {
actions...
sleepLoop();
}
</code></pre>
