Skip to content
Advertisement

Tag: sleep

What is the JavaScript version of sleep()?

Is there a better way to engineer a sleep in JavaScript than the following pausecomp function (taken from here)? This is not a duplicate of Sleep in JavaScript – delay between actions; I want a real sleep in the middle of a function, and not a delay before a piece of code executes. Answer 2017 — 2021 update Since 2009

Advertisement