DEV Community

Discussion on: ✨♻️ JavaScript Visualized: Event Loop

Collapse
 
jagajastic profile image
Ibrahim Joseph M.

Yes, It does Jonas, so lets say


let id = setTimeout( () => {
return "hey"}, 1000);

console.log(id) // you will get 1

let id2 = setTimeout( () => {
return "hey"}, 1000);

console.log(id2) // you will get 2

Collapse
 
thamerbelfkihthamer profile image
thamer belfkih

thank guys to point out this detail, in the same context what's the purpose of this Id and it is used by the web API or the call stack for some purpose? thanks in advance