Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 342 Bytes

14_task_queue_and_microtask_queue_of_event_loop.md

File metadata and controls

12 lines (10 loc) · 342 Bytes

Event Loop's Task Queue and Micro Task Queue

console.log("Hello script")
setTimeout(() => console.log("Work done!"), 5000)

fetch('https://api.myjson.com/bins/c8j82')
.then((response) => response.json())
.then(jsonData => console.log(jsonData))
.then(() => console.log('Data fetched.. exiting now!'))

console.log("Bye! Script")