โ† 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

Ranked by how often each question comes up in real interviews. #1 is the most common.

#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๐Ÿ”’