I'm trying to understand the APIs provided to JS engine by the browser.
Since JavaScript is single threaded, it has to outsource the timer to the browser so that the code execution is not blocked.
So JavaScript has to introduce the timer functionality via a API call to the browser. Am I right or wrong?