Skip to content

Latest commit

 

History

History
11 lines (5 loc) · 552 Bytes

what_are_tasks_in_event_loop.md

File metadata and controls

11 lines (5 loc) · 552 Bytes

What are tasks in event loop?

In JavaScript, tasks (also called 'macrotasks') refer to operations in the event loop that are executed one by one. Each task is a block of code that is executed synchronously, like handling events, setTimeout, setInterval, etc.

Tasks are processed in the event loop, and when one task completes, the next one in the queue is executed.

Tags: advanced, JavaScript, Event Loop