JavaScript (ES2026)
JavaScript from a first script to production code: values and types, functions, objects, async code and the event loop, the DOM, Node.js and testing.
75 lessons: 73 free with Pro answers and 2 with a free core.
Examples run with Node.js 24.21.0 and quickjs 0.32.0.
Who it is for
Web beginners, Node.js developers and developers coming from Python or Java who want to write modern JavaScript with confidence.
What you will be able to do
- Run JavaScript in a browser, in Node.js and in the Run buttons of these pages, and read the errors it reports
- Predict how values, types, equality and numbers behave, floating-point traps included
- Write functions, closures, objects, classes and modules that stay easy to read and test
- Use arrays, strings, Map, Set, iterators and generators correctly and at the right cost
- Write asynchronous code with promises and async functions, and explain what the event loop does
- Build pages with the DOM, events, accessible forms and network requests
- Write command-line tools with Node.js that read files, streams and configuration safely
- Test, lint, type-check and secure JavaScript code, and build a browser extension with Manifest V3
Revise and practise
- Practice: every exercise and quiz (74 exercises, 75 quizzes)
Modules and lessons
What the labels mean
- Free lesson, Pro answers
- the whole lesson is free; the model answers to its interview questions open with a pass
- Free core, Pro depth
- the core of the lesson is free; its in-depth parts open with a pass
- Pro
- opens with a Pro, Premium or Ultimate pass
Minutes are reading time: “8 of 25 min free” means 8 minutes of the lesson are free.
What a pass opens in this track
4 in-depth parts and 152 interview answers. The same pass opens every other track and every Pro tool.
- Module 1
Start here: what JavaScript is and how to run it
What JavaScript and ECMAScript are, engines and hosts, running code in the browser and Node.js, the console and error messages, syntax and strict mode, and guides for Python and Java developers.
- JavaScript, ECMAScript and where code runs Free lesson, Pro answers: 14 minutes
- Run JavaScript in the browser, the runner and Node Free lesson, Pro answers: 16 minutes
- The console and reading error messages Free lesson, Pro answers: 16 minutes
- Statements, semicolons, comments and strict mode Free lesson, Pro answers: 16 minutes
- JavaScript for Python developers Free lesson, Pro answers: 25 minutes
- JavaScript for Java developers Free lesson, Pro answers: 25 minutes
- Module 2
Values, types and operators
let and const, primitive types and typeof, numbers, Math and BigInt, strings, truthiness, null and undefined, type conversion, the three kinds of equality and operator precedence.
- Variables with let and const Free lesson, Pro answers: 15 minutes
- Primitive types and typeof Free lesson, Pro answers: 14 minutes
- Numbers and floating-point arithmetic Free lesson, Pro answers: 22 minutes
- Math, rounding and random numbers Free lesson, Pro answers: 22 minutes
- BigInt for arbitrarily large integers Free lesson, Pro answers: 18 minutes
- Strings and template literals Free lesson, Pro answers: 18 minutes
- Booleans, truthy and falsy values Free lesson, Pro answers: 15 minutes
- null, undefined, optional chaining and ?? Free lesson, Pro answers: 18 minutes
- Type conversion and coercion Free lesson, Pro answers: 22 minutes
- Equality: ==, === and Object.is Free lesson, Pro answers: 20 minutes
- Operators, short-circuiting and precedence Free lesson, Pro answers: 20 minutes
- Module 3
Control flow
if and the ternary operator, switch and lookup tables, every kind of loop with break and continue, and the difference between for…of and for…in.
- Conditionals: if, else and the ternary operator Free lesson, Pro answers: 16 minutes
- switch statements and lookup tables Free lesson, Pro answers: 15 minutes
- Loops: for, while, do…while, break and continue Free lesson, Pro answers: 18 minutes
- for…of vs for…in Free lesson, Pro answers: 16 minutes
- Module 4
Functions, scope and closures
Declarations and expressions, parameters and defaults, arrow functions, scope and hoisting, the temporal dead zone, closures, higher-order functions and recursion.
- Function declarations, expressions and return values Free lesson, Pro answers: 20 minutes
- Parameters, defaults and rest parameters Free lesson, Pro answers: 16 minutes
- Arrow functions Free lesson, Pro answers: 15 minutes
- Scope, the scope chain and execution contexts Free lesson, Pro answers: 22 minutes
- Hoisting, var and the temporal dead zone Free lesson, Pro answers: 22 minutes
- Closures in JavaScript Free lesson, Pro answers: 22 minutes
- Higher-order functions and callbacks Free lesson, Pro answers: 20 minutes
- Recursion and the call stack Free lesson, Pro answers: 22 minutes
- Module 5
Objects in depth
Object literals and references, copying with structuredClone, this, call, apply and bind, key order, destructuring and spread, property descriptors, symbols, conversions and JSON.
- Object literals, properties and methods Free lesson, Pro answers: 16 minutes
- References, copying and structuredClone Free lesson, Pro answers: 18 minutes
- Methods and the this keyword Free lesson, Pro answers: 20 minutes
- call, apply and bind Free lesson, Pro answers: 18 minutes
- Object.keys, entries, fromEntries and key order Free lesson, Pro answers: 15 minutes
- Destructuring objects and arrays Free lesson, Pro answers: 18 minutes
- Module 6
Arrays and array methods
Creating and changing arrays, searching, map, filter and reduce, sorting correctly, the copying methods toSorted and with, array-likes, and grouping data.
- Arrays: creating, reading and length Free lesson, Pro answers: 15 minutes
- Adding and removing items Free lesson, Pro answers: 15 minutes
- Searching: includes, indexOf, find, some and every Free lesson, Pro answers: 14 minutes
- Transforming arrays with map, filter and forEach Free lesson, Pro answers: 15 minutes
- reduce in depth Free lesson, Pro answers: 25 minutes
- Sorting arrays correctly Free lesson, Pro answers: 20 minutes
- Copying array methods: toSorted, toSpliced, with Free lesson, Pro answers: 15 minutes
- flat, flatMap, Array.from and array-likes Free lesson, Pro answers: 15 minutes
- Grouping data with Object.groupBy and Map.groupBy Free lesson, Pro answers: 15 minutes
- Module 7
Strings, Unicode and regular expressions
Everyday string methods, tagged templates, code units, code points and graphemes, normalisation and locale-aware comparison, regular expressions and text encoding.
- Regular expressions in JavaScript Free lesson, Pro answers: 25 minutes
- Modern regex features and RegExp.escape Free lesson, Pro answers: 25 minutes
- Text encoding, bytes and Base64 Free lesson, Pro answers: 20 minutes
- Module 8
Map, Set and weak collections
Map with keys of any type and the upsert methods, Set and its set operations, WeakMap, WeakSet and WeakRef, and choosing the right collection for a job.
- Map: keys of any type and the ES2026 upsert methods Free lesson, Pro answers: 20 minutes
- Set and the ES2025 set methods Free lesson, Pro answers: 18 minutes
- WeakMap, WeakSet, WeakRef and FinalizationRegistry Free lesson, Pro answers: 22 minutes
- Choosing between objects, arrays, Map and Set Free lesson, Pro answers: 18 minutes
- Module 9
Errors and debugging
try, catch, finally and throw, the built-in error types, custom errors and error causes, an error-handling strategy, and debugging in DevTools and Node.js.
- try, catch, finally and throw Free lesson, Pro answers: 17 minutes
- Built-in error types and engine messages Free lesson, Pro answers: 18 minutes
- Custom errors, error cause and Error.isError Free lesson, Pro answers: 19 minutes
- Debugging in DevTools and Node Free lesson, Pro answers: 22 minutes
- Module 10
Iterators and generators
The iteration protocols, generator functions and two-way generators, lazy iterator helpers, and combining iterators with concat, zip and chunks.
- The iteration protocols Free lesson, Pro answers: 18 minutes
- Generator functions Free lesson, Pro answers: 18 minutes
- Two-way generators: next, return, throw, yield* Free lesson, Pro answers: 22 minutes
- Iterator helpers: lazy map, filter, take and more Free lesson, Pro answers: 18 minutes
- Combining iterators: concat, zip, chunks and join Free lesson, Pro answers: 20 minutes
- Module 11
Prototypes and classes
Prototypes and the prototype chain, constructors and new, classes with fields and accessors, inheritance, private fields, extending built-ins and composition.
- Prototypes and the prototype chain Free lesson, Pro answers: 20 minutes
- Constructor functions and the new operator Free lesson, Pro answers: 18 minutes
- Private fields, methods and brand checks Free lesson, Pro answers: 20 minutes
- Extending built-ins: Array, Error and Map Free lesson, Pro answers: 20 minutes
- instanceof, duck typing and cross-realm checks Free lesson, Pro answers: 20 minutes
- Composition, mixins and OOP design in JavaScript Free lesson, Pro answers: 22 minutes
- Module 12
Modules, packages and build tools
ES modules, dynamic import and top-level await, import maps, CommonJS and dual packages, npm and lockfiles, bundlers and polyfills, and module boundaries.
- ES modules: import and export Free lesson, Pro answers: 20 minutes
- CommonJS, require(esm) and dual packages in Node Free lesson, Pro answers: 22 minutes
- npm, semver, lockfiles and supply-chain safety Free lesson, Pro answers: 24 minutes
- Bundlers, transpilers, polyfills and Baseline Free lesson, Pro answers: 24 minutes
- Designing module boundaries and public APIs Free lesson, Pro answers: 22 minutes
- Module 13
Asynchronous JavaScript
Callbacks, timers, promises and their combinators, async functions, error handling, cancellation with AbortController, async iterators, limits and retries.
- Synchronous and asynchronous code Free lesson, Pro answers: 18 minutes
- Callbacks and error-first style Free core, Pro depth: 8 of 25 minutes free
- Module 15
The DOM
How browsers load scripts, selecting and changing elements safely, attributes, classes and styles, sizes and scrolling, large lists and MutationObserver.
- How browsers load and run scripts Free lesson, Pro answers: 20 minutes
- The DOM tree and selecting elements Free core, Pro depth: 8 of 22 minutes free
Related tools
Official documentation
- ECMAScript 2026 Language Specification (ECMA-262, 17th edition) (Ecma International)
- JavaScript reference (MDN Web Docs)
- Node.js v24 documentation (OpenJS Foundation (Node.js))
- TC39 finished proposals (Ecma International (TC39))
- HTML Living Standard (WHATWG)