JavaScript From Zero
JavaScript is the one language you can't avoid. It runs every website on Earth, it runs on servers through Node.js, it powers desktop apps and phone apps and build tools. That ubiquity is a blessing and a curse: there's a lot of it, and most tutorials drop you straight into a framework without ever explaining what the language actually is or how it thinks.
This guide does the opposite. We build your mental model first - what a value is, how types behave, why
let and const replaced var, what "asynchronous" really means - and only then reach for the tools.
By the end you'll be able to reason about JavaScript instead of pasting snippets and praying.
It's one zero-to-hero journey in two halves. Phases 1–9 are the basics - enough to write real,
well-organized programs and read any codebase. Phases 10–17 are the deep half - scope and closures,
this and prototypes, generators, the event loop's true ordering, functional JS, bundlers, performance,
and the road to TypeScript. That's the stuff that separates "writes JavaScript" from "understands
JavaScript." Each phase carries a difficulty badge so you can see the climb.
📝 This guide teaches the language. If you've never programmed at all, start with Programming From Zero first - it covers the universal ideas (what a program is, variables, loops) that every language shares. Then come back here.
How to read this
- Brand new to JavaScript? Read 1–9 in order, top to bottom - each builds on the last. Type the examples out yourself (most are runnable right here); running code teaches more than reading it five times. Come back for 10+ when the basics feel comfortable.
- Already know another language? Skim phases 1–5 for the JavaScript-specific details (loose typing,
===, ES modules,package.json), then slow down at phase 6 - the asynchronous model is where JavaScript genuinely differs from most languages. - Past the basics already? Jump straight to the deep half - Phase 10: Scope, Closures & Hoisting onward is where JavaScript stops being "a language you can use" and becomes one you can reason about to the metal.
The phases
Part 1 - The basics (🟢 Basic → 🟡 Intermediate)
- Install & Your First Program 🟢 - the browser and Node.js; install Node, run a file, use the console.
- Syntax, Values & Types 🟢 -
let/const, the primitive types, template literals, loose typing. - Collections 🟢 - arrays and objects, daily methods, and the reference-vs-value trap.
- Control Flow & Functions 🟢 -
if/loops/functions, arrow functions, functions as values. - Modules & Project Layout 🟢 -
import/export,package.json,node_modules, a sane shape. - Async & the DOM 🟡 - callbacks, promises,
async/await, and reaching into a web page. - Errors & I/O 🟡 -
try/catch, files in Node, and the network without falling over. - Ecosystem & Tooling 🟡 - npm, linters, formatters, bundlers, and where TypeScript fits.
- Idioms & Gotchas 🟡 - the fluent patterns, and the famous footguns explained once, properly.
Part 2 - Beyond the basics (🔴 Advanced)
10. Scope, Closures & Hoisting 🔴 - the scope chain, the TDZ, and how a function remembers where it was born.
11. this, Prototypes & the Object Model 🔴 - the four this rules, the prototype chain, classes as sugar.
12. Iterators, Generators & Symbols 🟡 - the iterable protocol, function*, and values on demand.
13. The Event Loop, Deep 🔴 - tasks vs microtasks, and why Promise runs before setTimeout.
14. Functional JavaScript 🟡 - pure functions, higher-order functions, immutability, composition.
15. Modules & Bundlers, Deep 🟡 - ESM vs CommonJS, tree-shaking, dynamic import, what a bundler does.
16. Performance & Memory 🔴 - how V8 runs your code, the GC, and finding the real slow thing.
17. Types & the Road to TypeScript 🟡 - what static typing buys you, and the short leap to TS.
Finale 18. Where to Go Next 🟢 - frameworks, backend, full-stack, and what to actually build.
Frameworks (React, Vue, Svelte) and TypeScript are their own guides - different tools, not "more JavaScript." This guide makes the language make sense, top to bottom.