Academy
JavaScript
10 pages · about 54 min of reading
- 01Closures in JavaScriptWhat a closure is, why the variable outlives the function that created it, and the loop bug every JavaScript developer hits once.
- 02The JavaScript event loopHow one thread runs everything: the call stack, the microtask queue, timers, and why a promise always resolves before a setTimeout of 0.
- 03Promise.all, allSettled, race and anyThe four ways to combine promises, what each one does with a rejection, and how to pick the right one without guessing.
- 04How this is decided at call timeThe four rules that fix the value of this at call time, why extracting a method breaks it, and what arrow functions actually change.
- 05Prototypes and the prototype chainHow property lookup really works, what class is syntax for, and the difference between prototype and __proto__ that trips everyone up.
- 06Hoisting and the temporal dead zoneWhat is really moved to the top of a scope, why let and const are hoisted too, and the difference between undefined and a ReferenceError.
- 07Equality: ==, === and Object.isWhat loose equality really does, the two cases where === is not what you want, and why comparing objects almost never means what people expect.
- 08Shallow copy vs deep copyWhy spreading an object still shares its nested values, what structuredClone fixes, and what JSON round-tripping quietly destroys.
- 09Debounce vs throttleTwo ways to fire less often, and the one question that tells you which you need — do you want the last call, or a steady rate?
- 10Iterators and generatorsThe protocol behind for...of and spread, how a generator writes one for you, and why a paused function is the point.