Of course, the devil is in the details, even for something as seemingly simple as setTimeout. A common description of setTimeout goes something like this:
Given a callback and a delay of n milliseconds, setTimeout runs that callback n milliseconds later.
But as we’ll see in this section, and throughout this chapter, that description is seriously flawed. In most cases, it’s only ...