You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Node.js, setTimeout() and setInterval() returns a Timeout object, which can be used to cancel or manipulate the timer. In browsers, it returns a numeric timer ID. The current Node.js documentation says these functions return a "timer ID", which can be misleading in the Node context.
Docs should reflect Node-specific behavior more precisely
Browser devs might expect a number and be confused when console.log(setTimeout(...)) gives them an object.
They might not realize unref() and other methods are available.