이벤트 루프





웹 API에서 logworld() -> 태스크 큐로

작업 대기열에서 logworld() -> 호출 스택으로

빈 호출 스택은 이벤트 루프가 완료되었음을 의미합니다!

그러나 setTimeout 시간이 0이면?
function logWorld() {
console.log('world');
}
function main() {
console.log('hello');
setTimeout(logWorld,0);
console.log('goodbye');
}
main();
같은 일이 일어났다

Reference
이 문제에 관하여(이벤트 루프), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/pooyaalamdari/event-loop-4oi6텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)