โก 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.
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๐