← All topics

⚑ Interview Prep

JavaScript

Closures, this, promises, the event loop, and the utility functions front-end and full-stack interviews ask you to build by hand.

100 questions, most asked first

Ordered so the most useful questions for learning each pattern come first.

#1What is a closure?Scope & closuresMediumFree#2Explain the event loopEvent loopMediumFree#5Implement debounceBuild it yourselfMediumFree#6How does `this` work?this & prototypesMediumFree#7Promises vs async/awaitAsync & promisesMediumFree#10Implement deepCloneReferences & copyingMediumFreeUnlock 44 more JavaScript questions Β· all 1,200 questions for $39/year (about 11Β’ a day)See full access#11Implement throttleBuild it yourselfMediumπŸ”’#12Implement Promise.allAsync & promisesMediumπŸ”’#14Prototypal inheritancethis & prototypesMediumπŸ”’#16call, apply and bindthis & prototypesMediumπŸ”’#17Implement Function.prototype.bindthis & prototypesMediumπŸ”’#20Flatten a nested arrayBuild it yourselfMediumπŸ”’#21Implement memoizeBuild it yourselfMediumπŸ”’#22Implement curryBuild it yourselfMediumπŸ”’#29Implement Array.prototype.reduceBuild it yourselfMediumπŸ”’#30Promise.allSettled, race and anyAsync & promisesMediumπŸ”’#32Retry with exponential backoffAsync & promisesMediumπŸ”’#33Implement an EventEmitterBuild it yourselfMediumπŸ”’#39Error handling in async codeAsync & promisesMediumπŸ”’#45Lexical scope and the scope chainScope & closuresMediumπŸ”’#46Garbage collection and memory leaksReferences & copyingMediumπŸ”’#47WeakMap and WeakSetReferences & copyingMediumπŸ”’#50What are Symbols?Types & coercionMediumπŸ”’#51Generators and iteratorsModern syntaxMediumπŸ”’#57Implicit type coercionTypes & coercionMediumπŸ”’#58ES modules vs CommonJSModern syntaxMediumπŸ”’#59Promise chainingAsync & promisesMediumπŸ”’#61Implement deepEqualBuild it yourselfMediumπŸ”’#64LRU Cache with a MapBuild it yourselfMediumπŸ”’#68Implement promisifyAsync & promisesMediumπŸ”’#70The Node.js event loop and non-blocking I/OEvent loopMediumπŸ”’#71Web Workers and the main threadEvent loopMediumπŸ”’#73The temporal dead zoneScope & closuresMediumπŸ”’#75JSON.stringify gotchasReferences & copyingMediumπŸ”’#77Array length and holesArrays & objectsMediumπŸ”’#79extends, super and method overridingthis & prototypesMediumπŸ”’#80Custom error classesthis & prototypesMediumπŸ”’#82Immutable updates of nested stateReferences & copyingMediumπŸ”’#83Composition over inheritancethis & prototypesMediumπŸ”’#84Validate input with a regular expressionArrays & objectsMediumπŸ”’#85JavaScript Date pitfallsTypes & coercionMediumπŸ”’#87TypeScript interface vs typeModern syntaxMediumπŸ”’#88TypeScript genericsModern syntaxMediumπŸ”’#89any vs unknown vs neverTypes & coercionMediumπŸ”’#90Bundlers, tree shaking and code splittingModern syntaxMediumπŸ”’#91Add a timeout to any promiseAsync & promisesMediumπŸ”’#92Deduplicate in-flight requestsAsync & promisesMediumπŸ”’#94Implement instanceofthis & prototypesMediumπŸ”’#98Sort objects by multiple keysArrays & objectsMediumπŸ”’#100Making JavaScript fasterEvent loopMediumπŸ”’