cd ./topics/algorithms
Algorithms
Data structures and algorithms seen through a front-end lens.
posts (3)
- Trees, Part 3: Your Code Is a Tree — How JavaScript Reads 2 + 3 * 5
Before running a single line, JavaScript turns your code into a tree. See the real AST, build a working calculator in ~50 lines, peek at V8's bytecode, and discover why Babel, ESLint and Prettier are all tree tools.
- Trees, Part 2: Walking the DOM and Your Component Tree
Why querySelectorAll returns elements in that order, why React runs child effects before parent effects, and how one recursive component renders comments 50 levels deep.
- Trees, Part 1: The Data Structure You've Used Since Your First <div>
Open DevTools and you're already looking at a tree. Learn what a tree really is, the vocabulary the DOM API borrowed from it, and the one recursive idea that makes every tree problem easy.