JavaScript
The language itself — syntax, types, scope, functions, prototypes, classes, collections, the asynchronous model, modules, and the modern syntax and built-ins that make up idiomatic JavaScript — independent of any browser API or runtime. DOM manipulation, fetch, and browser storage are taught in `frontend`; the type system lives in `typescript`; Node's own runtime and module tooling live in `nodejs`. Thirty-nine lessons.
How JavaScript Code Is Parsed and ExecutedWhat happens between saving a .js file and a line of it running — parsing, bytecode, the JIT, and why "interpreted" undersells what engines like V8 do.Values, Types, and CoercionThe primitive types JavaScript has, what `typeof` really tells you, how implicit vs explicit coercion works, and truthy/falsy and `NaN` quirks.Equality and ComparisonHow `==` and `===` differ, what `Object.is` fixes that neither can, the SameValueZero algorithm `Map`/`Set` use, and why `==` surprises trace to coercion.Variables, Scope, and HoistingThe real differences between `var`, `let`, and `const`, function vs block scope, and why the temporal dead zone throws instead of returning `undefined`.Strict ModeWhat `'use strict'` changes, which silent failures it turns into thrown errors, and why ES modules and classes are already strict by default.Template Literals and Tagged TemplatesBacktick strings with `${}` interpolation and multi-line text, plus tagged templates — a function that intercepts a literal's pieces before they're joined.Optional Chaining, Nullish Coalescing, and Logical Assignment`?.` for safely reading a chain that might be `null`, `??` for defaulting only on missing values (not every falsy one), and the `||=`/`&&=`/`??=` operators.Function Declarations, Expressions, and Arrow FunctionsFunction declarations, expressions, and arrow functions do the same job, but differ in when they exist, hoisting, and what `this` means inside them.Default, Rest, and Spread ParametersDefault parameter values, rest parameters, and the spread syntax for unpacking an array into a function call — three small but common pieces of syntax.The `this` Keyword, `call`, `apply`, and `bind`Why `this` is decided at call time, not definition time, the binding rules behind it, and how `call`, `apply`, and `bind` override it on purpose.ClosuresWhy an inner function keeps access to an outer function's variables after it returns — private state, memoization, and the loop-variable bug.Common Closure Patterns: Debounce, Throttle, and MemoizationDebounce, throttle, memoization, and the "once" pattern — four utilities built the same way: a function closing over private state only it can see.IIFEs and the Module PatternThe IIFE, and the pre-ES6 trick of pairing one with closures to fake private state and a public API — what people did before real modules existed.Objects and Property DescriptorsWhat an object literal creates under the hood — the writable/enumerable/ configurable flags every property carries, getters/setters, and `Object.freeze`/`seal`.Prototypal Inheritance and Object.createHow JS objects share behavior without classes — the prototype chain, `Object.create`, `__proto__` vs `.prototype`, and how property lookup walks the chain.ES6 Classes and Inheritance`class` syntax as sugar over the prototype chain — `constructor`/ `extends`/`super`, and how method resolution works when a subclass and parent both define one.Private Fields and Static MembersReal, enforced privacy in classes with `#` fields, static members that belong to the class itself rather than any instance, and why it took until 2022.Arrays and Array MethodsWhich built-in array methods mutate in place versus return a new array, and when to reach for `map`/`filter`/`reduce` instead of a loop.Destructuring and SpreadPulling values out of arrays and objects with destructuring — nested, renamed, defaulted — and building new ones with the spread operator.Map, Set, and Weak CollectionsWhy `Map` and `Set` exist alongside objects and arrays, when they're the better tool, and how `WeakMap`/`WeakSet` avoid leaks with weak references.Iterators and GeneratorsThe iterator protocol behind `for...of`, how `Symbol.iterator` and `next()` work, and how generators use `yield` to write lazy, even infinite, sequences.Typed Arrays and ArrayBuffer`ArrayBuffer` as raw binary memory, the typed array views that give its bytes a numeric shape, and `DataView` for reading mixed types at byte offsets.The Event Loop and the Call StackHow a single-threaded engine runs timers and other work without blocking — the call stack, the host environment, and why microtasks cut ahead of macrotasks.Callbacks and Callback HellPassing a function to run later — why deeply nested callbacks become the "pyramid of doom," and the error-first convention built to cope with it.PromisesThe `Promise` object standing in for a value that doesn't exist yet — its three states, chaining with `.then`/`.catch`/`.finally`, and ways to combine promises.Async/Await`async`/`await` as sugar over promises that reads top to bottom, and the mistake of awaiting serially in a loop when the work could run concurrently.Error Handling and Custom Errors`try`/`catch`/`finally`, subclassing `Error` for custom error types, and async failure modes: unhandled rejections and `await` slipping past `try`/`catch`.ES Modules: Import and ExportHow `import`/`export` make a module's dependencies readable without running it, why exported bindings stay live, and how CommonJS's `require` differs.Dynamic Import, Top-Level Await, and `import.meta`Loading a module on demand with `import()`, using `await` at a module's top level instead of only inside `async` functions, and what `import.meta` tells you.Strings and UnicodeThe string methods you reach for daily, why strings are immutable, and the UTF-16 gotcha behind why `"😀".length` is `2`.Regular ExpressionsPattern syntax for matching text — classes, quantifiers, and groups — plus the methods that run a pattern and the gotchas that catch almost everyone once.JSON and SerializationTurning a value into a JSON string and back with `JSON.stringify`/`parse`, their `replacer`/`reviver` hooks, and what gets lost on the way through.Dates, Numbers, and Internationalization`Date`'s well-known rough edges, why `0.1 + 0.2 !== 0.3`, and using `Intl` to format dates and numbers correctly instead of hand-rolling it.Symbols and Well-Known Symbols`Symbol` as a primitive that never collides, why that makes it a useful property key, and how "well-known" symbols hook into built-in behavior.Proxies and ReflectHow `Proxy` intercepts operations through traps like `get`/`set`/`has`/`deleteProperty`, how `Reflect` gives traps a safe fallback, and real uses.Functional Patterns in JavaScriptWriting JavaScript in a practical functional style — pure functions, immutability by convention, higher-order functions, currying, and composition.Memory Management and Garbage CollectionHow a JS engine decides what memory to reclaim and when, mark-and-sweep, and the everyday leaks — forgotten timers, listeners, closures.`WeakRef` and `FinalizationRegistry`Holding a reference that doesn't stop garbage collection, running cleanup when an object is collected, and why both are last-resort, non- deterministic tools.`BigInt` and Arbitrary-Precision IntegersWhy `Number` loses precision past `MAX_SAFE_INTEGER`, the `BigInt` primitive and `123n` syntax, what can't mix with `Number`, and when it's overkill.
Language foundations
- How JavaScript Code Is Parsed and ExecutedWhat happens between saving a .js file and a line of it running — parsing, bytecode, the JIT, and why "interpreted" undersells what engines like V8 do.
- Values, Types, and CoercionThe primitive types JavaScript has, what `typeof` really tells you, how implicit vs explicit coercion works, and truthy/falsy and `NaN` quirks.
- Equality and ComparisonHow `==` and `===` differ, what `Object.is` fixes that neither can, the SameValueZero algorithm `Map`/`Set` use, and why `==` surprises trace to coercion.
- Variables, Scope, and HoistingThe real differences between `var`, `let`, and `const`, function vs block scope, and why the temporal dead zone throws instead of returning `undefined`.
- Strict ModeWhat `'use strict'` changes, which silent failures it turns into thrown errors, and why ES modules and classes are already strict by default.
- Template Literals and Tagged TemplatesBacktick strings with `${}` interpolation and multi-line text, plus tagged templates — a function that intercepts a literal's pieces before they're joined.
- Optional Chaining, Nullish Coalescing, and Logical Assignment`?.` for safely reading a chain that might be `null`, `??` for defaulting only on missing values (not every falsy one), and the `||=`/`&&=`/`??=` operators.
Functions and `this`
- Function Declarations, Expressions, and Arrow FunctionsFunction declarations, expressions, and arrow functions do the same job, but differ in when they exist, hoisting, and what `this` means inside them.
- Default, Rest, and Spread ParametersDefault parameter values, rest parameters, and the spread syntax for unpacking an array into a function call — three small but common pieces of syntax.
- The `this` Keyword, `call`, `apply`, and `bind`Why `this` is decided at call time, not definition time, the binding rules behind it, and how `call`, `apply`, and `bind` override it on purpose.
- ClosuresWhy an inner function keeps access to an outer function's variables after it returns — private state, memoization, and the loop-variable bug.
- Common Closure Patterns: Debounce, Throttle, and MemoizationDebounce, throttle, memoization, and the "once" pattern — four utilities built the same way: a function closing over private state only it can see.
- IIFEs and the Module PatternThe IIFE, and the pre-ES6 trick of pairing one with closures to fake private state and a public API — what people did before real modules existed.
Objects, prototypes, and classes
- Objects and Property DescriptorsWhat an object literal creates under the hood — the writable/enumerable/ configurable flags every property carries, getters/setters, and `Object.freeze`/`seal`.
- Prototypal Inheritance and Object.createHow JS objects share behavior without classes — the prototype chain, `Object.create`, `__proto__` vs `.prototype`, and how property lookup walks the chain.
- ES6 Classes and Inheritance`class` syntax as sugar over the prototype chain — `constructor`/ `extends`/`super`, and how method resolution works when a subclass and parent both define one.
- Private Fields and Static MembersReal, enforced privacy in classes with `#` fields, static members that belong to the class itself rather than any instance, and why it took until 2022.
Collections and iteration
- Arrays and Array MethodsWhich built-in array methods mutate in place versus return a new array, and when to reach for `map`/`filter`/`reduce` instead of a loop.
- Destructuring and SpreadPulling values out of arrays and objects with destructuring — nested, renamed, defaulted — and building new ones with the spread operator.
- Map, Set, and Weak CollectionsWhy `Map` and `Set` exist alongside objects and arrays, when they're the better tool, and how `WeakMap`/`WeakSet` avoid leaks with weak references.
- Iterators and GeneratorsThe iterator protocol behind `for...of`, how `Symbol.iterator` and `next()` work, and how generators use `yield` to write lazy, even infinite, sequences.
- Typed Arrays and ArrayBuffer`ArrayBuffer` as raw binary memory, the typed array views that give its bytes a numeric shape, and `DataView` for reading mixed types at byte offsets.
Asynchronous JavaScript
- The Event Loop and the Call StackHow a single-threaded engine runs timers and other work without blocking — the call stack, the host environment, and why microtasks cut ahead of macrotasks.
- Callbacks and Callback HellPassing a function to run later — why deeply nested callbacks become the "pyramid of doom," and the error-first convention built to cope with it.
- PromisesThe `Promise` object standing in for a value that doesn't exist yet — its three states, chaining with `.then`/`.catch`/`.finally`, and ways to combine promises.
- Async/Await`async`/`await` as sugar over promises that reads top to bottom, and the mistake of awaiting serially in a loop when the work could run concurrently.
- Error Handling and Custom Errors`try`/`catch`/`finally`, subclassing `Error` for custom error types, and async failure modes: unhandled rejections and `await` slipping past `try`/`catch`.
Modules and language utilities
- ES Modules: Import and ExportHow `import`/`export` make a module's dependencies readable without running it, why exported bindings stay live, and how CommonJS's `require` differs.
- Dynamic Import, Top-Level Await, and `import.meta`Loading a module on demand with `import()`, using `await` at a module's top level instead of only inside `async` functions, and what `import.meta` tells you.
- Strings and UnicodeThe string methods you reach for daily, why strings are immutable, and the UTF-16 gotcha behind why `"😀".length` is `2`.
- Regular ExpressionsPattern syntax for matching text — classes, quantifiers, and groups — plus the methods that run a pattern and the gotchas that catch almost everyone once.
- JSON and SerializationTurning a value into a JSON string and back with `JSON.stringify`/`parse`, their `replacer`/`reviver` hooks, and what gets lost on the way through.
- Dates, Numbers, and Internationalization`Date`'s well-known rough edges, why `0.1 + 0.2 !== 0.3`, and using `Intl` to format dates and numbers correctly instead of hand-rolling it.
Advanced JavaScript
- Symbols and Well-Known Symbols`Symbol` as a primitive that never collides, why that makes it a useful property key, and how "well-known" symbols hook into built-in behavior.
- Proxies and ReflectHow `Proxy` intercepts operations through traps like `get`/`set`/`has`/`deleteProperty`, how `Reflect` gives traps a safe fallback, and real uses.
- Functional Patterns in JavaScriptWriting JavaScript in a practical functional style — pure functions, immutability by convention, higher-order functions, currying, and composition.
- Memory Management and Garbage CollectionHow a JS engine decides what memory to reclaim and when, mark-and-sweep, and the everyday leaks — forgotten timers, listeners, closures.
- `WeakRef` and `FinalizationRegistry`Holding a reference that doesn't stop garbage collection, running cleanup when an object is collected, and why both are last-resort, non- deterministic tools.
- `BigInt` and Arbitrary-Precision IntegersWhy `Number` loses precision past `MAX_SAFE_INTEGER`, the `BigInt` primitive and `123n` syntax, what can't mix with `Number`, and when it's overkill.