앞의 내용과 이어지는 부분을 설명하기 위해 순서를 조금 바꾸었다.
배경지식 조금 ...

추가 참고자료: (자료) JavaScript Engine and Runtime Explained 외

JS 런타임에 대한 설명은 다음과 같다.
A JavaScript (JS) runtime is a comprehensive environment that enables the execution of JavaScript code. It consists of various components working together to facilitate the execution of JavaScript applications. When we refer to a JS runtime, we're typically talking about the entire ecosystem that extends beyond the basic execution of code. … Depending on where JavaScript is running (the web browser or server-side with Node.js), there might be additional environment-specific features in the runtime. …
Just think of a JS runtime as a big box that includes all the things we need to run JavaScript in the browser. - freeCodeCamp
JS 런타임은 위 이미지와 같이 JS엔진에 더해 Web API와 Queue 자료구조를 포함하고 있으며, 이들 사이를 관리 감독하는 Event Loop라는 시스템을 가지고 있다고 볼 수 있다. 해당 요소들에 대한 poiemaweb의 설명은 다음과 같다.
function func1() {
console.log('func1');
func2();
}
function func2() {
setTimeout(
function() { console.log('func2'); }, // setTimeout의 callback함수
0 // 인수 인터벌. (대기할 시간을 지정하는 인자)
);
func3();
}
function func3() {
console.log('func3');
}
func1();