Learn how to create a sleep function in JavaScript for pausing code execution, given no built-in sleep() function for delaying program flow.
Continue reading
Delay, Sleep, Pause & Wait in JavaScript
on SitePoint.