Skip to content

Commit a37e62c

Browse files
JS Interview prep
1 parent 1d58169 commit a37e62c

File tree

5 files changed

+6359
-2
lines changed

5 files changed

+6359
-2
lines changed

JS-Interview-Questions/eventloop.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,17 @@ asyncFunction();
310310

311311
console.log("4");
312312
```
313+
* async functions start synchronously
314+
* await splits execution into:
315+
* sync part
316+
* microtask continuation
317+
318+
* Even an already-resolved Promise yields
319+
320+
* Microtasks run after all synchronous code
321+
322+
* JavaScript never pauses the thread
323+
313324

314325
**Output:**
315326
```

0 commit comments

Comments
 (0)