Javascript Event Loop

Photo by Iva Rajović on Unsplash

Introduzione

Event Loop

Call Stack

const first = () => console.log("first")const second = () => console.log("second")const third = () => console.log("third")// Execute the functions
first()
second()
third()
//
first
second
third
const first = () => console.log("first")const second = () => setTimeout(() => console.log("second"), 0)const third = () => console.log("third")// Execute the functions
first()
second()
third()
first
third
second

Queue

Software developer with a passion for books and reading.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store