What technical or other reasons prevent the implementation of sleep()
in Javascript?
UPDATE: I'm aware of ways to delay execution of code (setTimeout
, setInterval
etc.) The problem these create is that the developer is forced to split the code block into two parts, that which is executed before the time-gap, and that which is executed afterwards, which is arguably undesirable.