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