ENع
الدرس 18 · Async JavaScript

The event loop

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

JavaScript runs your code on one thread, one thing at a time, so it never stops to wait. Follow an eight-line script that prints start, end, promise, timeout: watch frames pile up on the call stack, two callbacks wait in the task queue and the microtask queue, and the event loop move them back onto the stack once it is empty, microtasks first.

10 دقيقة10 خطوات5 أسئلةIntermediate
شكل 18 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.