Interview Hack
Home
About
Games
Levels
JavaScript Quiz - Level 6
1. When does process.nextTick() run?
Before any phase, after current op
In timers phase
In check phase
In idle/prepare phase
2. Microtasks vs macrotasks?
Micro run before next render/macrotask
Micro are slower
Micro run after all macros
Random order
3. Cause of JS memory leak?
Unintentional globals
Too much const
Arrow functions
Default params
4. Tail call optimization?
Reuses stack frame
Optimizes sorting
Optimizes loops
Optimizes events
5. Async iterator creation?
Symbol.asyncIterator with next() Promise
for...in with async
Await in any iterator
Map over Promises
6. yield* in generators?
Delegates to another iterable
Return and end
Repeat last yield
Yield all at once
7. Decorators are...
Funcs that modify at def time
Run once at start
Only on classes
Compile to machine code
8. Purpose of Atomics?
Atomic ops on shared memory
Encrypt memory
Parallel w/o lock
Faster sorting
9. SharedArrayBuffer does?
Threads share memory buffer
Copies data between threads
Only with async
Private per thread
SUBMIT EXAM