Last updated: June 26, 2026
10 of 10 questions
Variables captured in a closure are inaccessible from outside; exposing only selected functions creates private state and a public API.
Synchronous code runs first; then all microtasks drain; then one macrotask runs, after which microtasks drain again — repeating each loop tick.
Lookup checks the object’s own properties, then follows [[Prototype]] links upward until found or it reaches null, returning undefined if absent.
Precedence: new binding, then explicit bind/call/apply, then implicit (object before the dot), then default (undefined in strict mode); arrows inherit lexically.
Modern engines use mark-and-sweep: starting from roots, they mark reachable objects and reclaim everything unmarked, with generational and incremental optimisations.
Async iterators yield promises of values; for-await-of consumes them sequentially, ideal for streams and paginated data that arrive over time.
ArrayBuffer is raw binary memory; typed arrays (Uint8Array, Float32Array) are views over it for efficient handling of binary data, files, and streams.
A tag function receives the static string parts as an array and the interpolated values as arguments, letting it transform or sanitise the output.
Composition combines small functions into one; compose applies right-to-left and pipe left-to-right, passing each result into the next function.
An AbortController exposes a signal you pass to fetch or listeners; calling abort() rejects the operation and triggers cleanup, preventing races and leaks.
Upload your resume and get an instant ATS score with keyword gaps — free, no sign-up.
JavaScript Interview Questions
50 questions
React Interview Questions
Node.js Interview Questions
10 questions