JavaScript in 30 words
Browse all 40 concepts

The JavaScript Event Loop Explained Simply

The Event Loop monitors the Call Stack and the Callback Queue. If the Call Stack is empty, it pushes the first event from the queue to the Call Stack.

console.log("Start");
setTimeout(() => {
  console.log("Timer");
}, 0);
Promise.resolve().then(() => {
  console.log("Promise");
});
console.log("End");

Read more about Event loop on MDN

AI panel

Ask AI to clarify the parts you don’t fully understand.

Connect your API key

Use your own API key for explanations and follow-up questions.

Get an API key ↗

Enter your API key and load your account’s models, or choose “Other model…” to enter a text model ID. You can change it later in Connection settings.

API usage is billed by your provider, separately from ChatGPT or Claude subscriptions. Loading models and connecting do not generate a paid answer.