Given the following code, when will the go function be executed?
go
setTimeout(go, 0);
Will it be added to the end of the job queue immediately or added to the end of the job queue after the minimum interval for setTimeout ?
setTimeout
In most browsers, the minimum delay time is 4 ms. You can use lower values ββwithout errors, but when the script actually executes, the browser will overwrite the timeout value.
https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout?redirectlocale=en-US&redirectslug=DOM%2Fwindow.setTimeout#Minimum.2F_maximum_delay_and_timeout_nesting
https://html.spec.whatwg.org/multipage/webappapis.html#timers
with a timeout of 0, it will be immediately added to the end of the job queue