title: Is there a Sleep/Pause/Wait function in JavaScript?
body: <p>Is there a JavaScript function that simulates the operation of the <code>sleep</code> function in PHP — a function that pauses code execution for x milliseconds, and then resumes where it left off?</p>
  
  <p>I found some things here on Stack Overflow, but nothing useful.</p>