Advanced Language Features
The layer libraries are built from: symbols, iterators and generators, all thirteen Proxy traps, weak collections, deterministic cleanup with using, functional composition, design patterns, measured performance, the classic leaks, the usual security holes, and ES2020 to ES2026.
What you will be able to do
- Use symbols and the well-known symbols to hook into language protocols instead of fighting them
- Write the iterator protocol by hand, then replace it with a generator and know what changed
- Reach for every one of the thirteen Proxy traps and forward correctly through Reflect
- Choose between Map, WeakMap and WeakRef, and explain why FinalizationRegistry is not a callback
- Wrap resources so they always release, with Symbol.dispose, using and DisposableStack
- Compose small pure functions instead of accumulating shared mutable state
- Name the pattern behind a piece of framework code and implement it from memory
- Measure before optimising, and keep object shapes monomorphic where it matters
- Recognise the four classic leak shapes in a heap snapshot and fix the retaining path
- Close the XSS and prototype pollution holes that appear in almost every codebase
- Say which ES2020 to ES2026 features are safe to ship and which are still landing
Lessons
- Symbols and Well-Known Symbols — A symbol is a key that no other code can ever guess or recreate, which makes it the only safe place to store metadata on an object you do not own. (16 min)
- Iterators and Generators — An iterator is a value that has not finished arriving yet, and a generator is a function you can pause in the middle and resume later with new information. (20 min)
- Proxy and Reflect — A Proxy is a customs officer standing between an object and everyone who talks to it, and Reflect is the phrase book it uses to pass a request through unchanged. (22 min)
- WeakMap, WeakSet and WeakRef — A normal collection is a hand gripping its keys, so nothing in it can ever be collected. A weak collection watches its keys instead, and lets go the moment the rest of the program does. (16 min)
- Metaprogramming — Metaprogramming is writing code whose subject is other code: instead of asking an object for a value, you ask it about its own shape, or rewrite how it behaves. (18 min)
- Explicit Resource Management —
usingis afinallyblock you cannot forget to write: the resource itself carries the instructions for releasing it, and the block exit runs them. (16 min) - Functional JavaScript — Functional programming is a bet that most bugs come from shared mutable state, so you pay a small tax in allocations to make state changes explicit and local. (20 min)
- Design Patterns — A design pattern is a name for a shape you keep drawing anyway, and in JavaScript most of the classic shapes collapse into a closure, a function argument, or an object of functions. (24 min)
- Performance and Optimisation — Performance work is measurement first and cleverness last: the engine is faster than you at everything except the things you asked it to do a million times. (22 min)
- Memory Management — Garbage collection does not free what you stopped using, it frees what nothing can reach, so every leak is a reference you forgot you were still holding. (18 min)
- Security Essentials — Every security bug in front-end JavaScript is the same bug: data from outside your program was treated as instructions instead of as text. (20 min)
- Modern JS: ES2020 to ES2026 — The language now ships every June, so "modern JavaScript" is not a version you learn once, it is a habit of checking what has landed and what your engines actually support. (24 min)