JavaScript
JavaScript’s core concepts, from how your code runs in memory to how promises schedule it. New topics join as soon as they’re ready.
Memory and scope
Where values live and how names are found, drawn as the call stack, scopes and heap.
- Execution ContextIntermediateWhat JavaScript sets up before running your code, and what happens each time a function is called.
- HoistingBeginnerWhy you can call a function before its line, but reading a let too early throws an error.
- Scope ChainIntermediateHow JavaScript finds a variable by searching from the current scope outward.
- ClosuresIntermediateHow a function keeps using the variables around it after the outer function has returned, and why a var loop prints 3, 3, 3.
- Primitive vs Reference TypesBeginnerWhy copying a number gives you a separate value, but copying an object gives you a second name for the same object.
- Shallow vs Deep CopyBeginnerWhy changing a copy made with spread can still change the original, and what structuredClone and JSON copy instead.
- Higher-Order FunctionsBeginnerFunctions are values: you can pass one to another function, or get one back as a result.
- The this KeywordIntermediateThe four rules that decide what this points to in a call (default, implicit, explicit and new), and why a method loses its object when you pass it around.
- call, apply & bindIntermediateHow call, apply and bind choose this for a function, how they differ, and how to write bind yourself with a closure.
- Arrow vs Regular FunctionsIntermediateWhy an arrow function takes this from the code around it while a regular function gets its own from each call, and what else arrows leave out: arguments, new and hoisting.
- Garbage CollectionAdvancedHow JavaScript decides which objects to free, and how a forgotten closure or event listener keeps memory alive.
Asynchronous code
How JavaScript waits for timers, promises and events without stopping.
- Callback HellIntermediateWhy steps that each wait on the one before end up nested deeper and deeper, and why that hurts.
- Synchronous vs AsynchronousBeginnerWhy slow work blocks everything when it runs in line, and how handing it off lets the rest keep going.
- Event LoopIntermediateWhy setTimeout(…, 0) still runs after the rest of your code, and where promises fit in.
- Promises & async/awaitIntermediateHow a promise stands in for a result that isn't ready yet, when its callbacks run, and what await really pauses.