// LEARN · LANGUAGES & FRAMEWORKS
JavaScript
A practical JavaScript course from a first program in the console to async code, Web Workers, security and publishing a package. Every example is run and checked against ECMAScript 2026.
Level: Beginner to advanced · For: Anyone who wants to program the web with JavaScript, from a first script to shipped code. No experience needed.
Syllabus
Beginner
Complete
After this level you can
- Run JavaScript in the browser console and with Node.js, and read a SyntaxError, ReferenceError or TypeError to find the fault
- Write programs with let and const, numbers, strings, template literals, conditions and loops, and explain === versus ==
- Write and call functions with default and rest parameters, arrow functions and closures
- Store and transform data with arrays and objects, map, filter, reduce, destructuring and spread, and convert it to and from JSON
- Build an interactive page that reads and changes the DOM in response to events, using event delegation
B1Getting started5 of 5 written · 5 lessonsRuns in your browser
Run, read and debug a first program
You build: A number-guessing game
B2Grammar, types and operators5 of 5 written · 5 lessonsRuns in your browser
Use every primitive type and operator correctly, including equality and sameness
You build: A unit converter
B3Control flow and loops5 of 5 written · 5 lessonsRuns in your browser
Choose the right branch and loop for a task
You build: A grade report
B4Functions5 of 5 written · 5 lessonsRuns in your browser
Write small reusable functions and understand closures
You build: A closure-based counter and formatter library
B5Arrays, objects and JSON5 of 5 written · 5 lessonsRuns in your browser
Transform collections of records with array methods, destructuring, spread and JSON
You build: Shopping-basket totals
B6The DOM and events5 of 5 written · 5 lessonsRuns in your browser
Make a page respond to the user with listeners, bubbling and delegation
You build: An image gallery
Beginner project
Pocket budget
A single page that adds, lists and deletes expenses, shows the total, filters by category and keeps its data in localStorage.
Runs in your browserSelf-checked against a rubric
Open the project guideIntermediate
Complete
After this level you can
- Model data with classes, private fields, inheritance and the prototype chain, and explain what class does under the hood
- Split a program into ES modules, run it with Node.js, and manage dependencies and scripts with npm
- Handle errors with try, catch, finally, custom Error subclasses and cause, and write tests with node:test
- Predict the order of synchronous code, microtasks and timers, and write correct async code with Promise.all, allSettled, any and race
- Fetch JSON over HTTP, handle HTTP errors and cancellation with AbortController, and store data on the client
I1Asynchronous JavaScript6 of 6 written · 6 lessonsRuns in your browser
Predict and control async execution order
You build: A quiz with a countdown
I2Objects, prototypes and classes5 of 5 written · 5 lessonsRuns in your browser
Model data with classes and explain prototypes
You build: An inventory model
I3Modules, Node.js and npm5 of 5 written · 5 lessonsRuns on your computer
Structure a multi-file program with ES modules and run it locally with Node.js and npm
You build: A command-line to-do tool
I4Errors, debugging and testing5 of 5 written · 5 lessonsRuns on your computer
Fail loudly, find faults fast, and prove behaviour with node:test
You build: A tested validation library
I5Working with data5 of 5 written · 5 lessonsRuns in your browser
Process text, dates and keyed data with Map, Set, regular expressions and Intl
You build: A log-file analyser
I6Network requests and client storage5 of 5 written · 5 lessonsRuns on your computer
Load, send and keep data in a web app with fetch, AbortController, localStorage and IndexedDB
You build: A reading-list client against a local JSON server
Intermediate project
Reading list
A Node.js command-line tool and browser client with ES modules, classes, a JSON file store and a fetch client that handles errors and cancellation.
Runs on your computerSelf-checked against a rubric
Open the project guideAdvanced
Coming soon
After this level you can
- Write iterables, generators and async iterators, and build lazy pipelines with iterator helpers
- Use property descriptors, symbols, Proxy and Reflect, and explain this binding and strict mode
- Move CPU-heavy work into a Web Worker, work with typed arrays, and find and fix a memory leak
- Recognise and prevent XSS, prototype pollution and dependency risks, and apply a Content Security Policy
- Publish a tested, linted package, deploy a static web app, and read ECMA-262 to settle a behaviour question
A1Iterators and generatorsComing soon · 5 lessonsRuns in your browser
Build lazy, composable data pipelines
You build: A lazy CSV pipeline
- A1.1Coming soon
- A1.2Coming soon
- A1.3Coming soon
- A1.4Coming soon
- A1.5Coming soon
A2Metaprogramming and object internalsComing soon · 5 lessonsRuns in your browser
Control how objects behave with descriptors, symbols, Proxy and Reflect
You build: A validated observable store
- A2.1Coming soon
- A2.2Coming soon
- A2.3Coming soon
- A2.4Coming soon
- A2.5Coming soon
A3this, strict mode and numbersComing soon · 5 lessonsRuns in your browser
Settle tricky behaviour questions about this, strict mode and numbers from the spec
You build: A money arithmetic module
- A3.1Coming soon
- A3.2Coming soon
- A3.3Coming soon
- A3.4Coming soon
- A3.5Coming soon
A4Concurrency and performanceComing soon · 5 lessonsRuns in your browser
Keep the main thread free and memory under control
You build: An image filter in a Web Worker
- A4.1Coming soon
- A4.2Coming soon
- A4.3Coming soon
- A4.4Coming soon
- A4.5Coming soon
A5SecurityComing soon · 5 lessonsBrowser and your computer
Prevent the common client-side attacks: XSS, prototype pollution and risky dependencies
You build: Dependency auditing
- A5.1Coming soon
- A5.2Coming soon
- A5.3Coming soon
- A5.4Coming soon
- A5.5Coming soon
A6Tooling, packaging and deploymentComing soon · 5 lessonsRuns on your computer
Ship code other people can use: lint, bundle, publish and deploy
You build: Deploying a static app
- A6.1Coming soon
- A6.2Coming soon
- A6.3Coming soon
- A6.4Coming soon
- A6.5Coming soon
Advanced project
CSV explorer
Parses a large CSV file in a Web Worker with a generator pipeline and shows summary statistics without blocking input, under a strict CSP.
Runs in your browserSelf-checked against a rubric
Capstone
Capstone
Offline-capable habit tracker
A static web app with modules, IndexedDB storage, JSON import and export, a keyboard-accessible UI, node:test tests and a deployment README.
Runs on your computerSelf-checked against a rubric
Sources
- ECMAScript 2026 Language Specification, 24.1.3.7 (Ecma TC39)
- What is JavaScript? (MDN Learn web development)
- Troubleshooting JavaScript (MDN Learn web development)
- console: log() static method (MDN Web APIs)
- Run Node.js scripts from the command line (Node.js Learn)
- Console (Node.js v24 documentation)
- Storing the information you need: Variables (MDN Learn web development)
- let (MDN JavaScript reference)
- const (MDN JavaScript reference)
- TypeError: invalid assignment to const "x" (MDN JavaScript error reference)
- ReferenceError: can't access lexical declaration 'X' before initialization (MDN JavaScript reference)
- JavaScript error reference (MDN)
- SyntaxError (MDN JavaScript reference)
- ReferenceError (MDN JavaScript reference)
- TypeError (MDN JavaScript reference)
- Error.prototype.stack (MDN)
- ReferenceError: "x" is not defined (MDN JavaScript reference)
- TypeError: "x" is (not) "y" (MDN JavaScript error reference)
- SyntaxError: string literal contains an unescaped line break (MDN JavaScript error reference)
- console (MDN Web APIs)
- debugger (MDN)
- Debugger (Node.js v24 documentation)
- A first splash into JavaScript (MDN Learn web development)
- if...else (MDN JavaScript reference)
- Math.random() (MDN JavaScript reference)
- Math.floor() (MDN JavaScript reference)
- Grammar and types (MDN JavaScript Guide)
- typeof (MDN JavaScript reference)
- Number (MDN JavaScript reference)
- Boolean (MDN JavaScript reference)
- Numbers and strings (MDN JavaScript Guide)
- Expressions and operators (MDN JavaScript Guide)
- Remainder (%) (MDN JavaScript reference)
- Math.round() (MDN JavaScript reference)
- Math.trunc() (MDN JavaScript reference)
- Number.prototype.toFixed() (MDN JavaScript reference)
- Number.isNaN() (MDN JavaScript reference)
- Number.parseInt() (MDN JavaScript reference)
- Number.MAX_SAFE_INTEGER (MDN JavaScript reference)
- JavaScript data types and data structures (MDN JavaScript Guide)
- String (MDN JavaScript reference)
- String.prototype.slice() (MDN JavaScript reference)
- String.prototype.includes() (MDN JavaScript reference)
- String.prototype.trim() (MDN JavaScript reference)
- String.prototype.padStart() (MDN JavaScript reference)
- Template literals (Template strings) (MDN JavaScript reference)
- Equality comparisons and sameness (MDN JavaScript Guide)
- Object.is() (MDN JavaScript reference)
- Less than (<) (MDN JavaScript reference)
- Number() constructor (MDN JavaScript reference)
- NIST Guide to the SI, Appendix B.8: Factors for Units Listed Alphabetically (NIST SP 811)
- NIST Guide to the SI, Footnotes to Appendix B (NIST SP 811)
- Control flow and error handling (MDN)
- Truthy (MDN Glossary)
- Logical AND (&&) (MDN JavaScript reference)
- Logical OR (||) (MDN JavaScript reference)
- Logical NOT (!) (MDN JavaScript reference)
- Nullish coalescing operator (??) (MDN JavaScript reference)
- switch (MDN JavaScript reference)
- Conditional (ternary) operator (MDN JavaScript reference)
- Loops and iteration (MDN JavaScript Guide)
- for (MDN JavaScript reference)
- while (MDN JavaScript reference)
- do...while (MDN JavaScript reference)
- for...of (MDN JavaScript reference)
- for...in (MDN JavaScript reference)
- break (MDN JavaScript reference)
- continue (MDN JavaScript reference)
- Labeled statement (MDN JavaScript reference)
- Functions (MDN JavaScript Guide)
- Functions - reusable blocks of code (MDN Learn web development)
- Build your own function (MDN Learn web development)
- function (MDN JavaScript reference)
- function expression (MDN JavaScript reference)
- TypeError: "x" is not a function (MDN JavaScript reference)
- Default parameters (MDN JavaScript reference)
- Rest parameters (MDN JavaScript reference)
- Spread syntax (...) (MDN JavaScript reference)
- Function return values (MDN Learn web development)
- return (MDN JavaScript reference)
- Arrow function expressions (MDN JavaScript reference)
- Closures (MDN JavaScript Guide)
- Scope (MDN Glossary)
- Indexed collections (MDN JavaScript Guide)
- Array.prototype.sort() (MDN JavaScript reference)
- Array.prototype.toSorted() (MDN JavaScript reference)
- Array.prototype.toReversed() (MDN JavaScript reference)
- Array.prototype.splice() (MDN JavaScript reference)
- Array.prototype.at() (MDN JavaScript reference)
- Array.prototype.find() (MDN JavaScript reference)
- Array.prototype.map() (MDN JavaScript reference)
- Array.prototype.filter() (MDN JavaScript reference)
- Array.prototype.reduce() (MDN JavaScript reference)
- TypeError: Reduce of empty array with no initial value (MDN JavaScript reference)
- Array.prototype.forEach() (MDN JavaScript reference)
- Array.prototype.some() (MDN JavaScript reference)
- Array.prototype.every() (MDN JavaScript reference)
- Working with objects (MDN JavaScript Guide)
- Destructuring (MDN JavaScript reference)
- Optional chaining (?.) (MDN JavaScript reference)
- Object.hasOwn() (MDN JavaScript reference)
- TypeError: 'x' is not iterable (MDN JavaScript reference)
- Working with JSON (MDN Learn web development)
- JSON.parse() (MDN JavaScript reference)
- JSON.stringify() (MDN)
- Array.isArray() (MDN JavaScript reference)
- try...catch (MDN)
- DOM scripting introduction (MDN Learn web development)
- Document: querySelector() method (MDN Web APIs)
- Document: querySelectorAll() method (MDN Web APIs)
- Document: getElementById() method (MDN Web APIs)
- Node: textContent property (MDN Web APIs)
- Element: getAttribute() method (MDN Web APIs)
- Element: setAttribute() method (MDN Web APIs)
- HTMLElement: dataset property (MDN Web APIs)
- DOMTokenList: toggle() method (MDN Web APIs)
- JavaScript modules (MDN JavaScript Guide)
- Document: createElement() method (MDN Web APIs)
- Element: append() method (MDN Web APIs)
- Element: prepend() method (MDN Web APIs)
- Element: remove() method (MDN Web APIs)
- Element: replaceChildren() method (MDN Web APIs)
- <template>: The Content Template element (MDN HTML reference)
- DocumentFragment (MDN Web APIs)
- Introduction to events (MDN Learn web development)
- EventTarget: addEventListener() method (MDN Web API reference)
- EventTarget: removeEventListener() method (MDN Web APIs)
- Event: currentTarget property (MDN Web APIs)
- KeyboardEvent: key property (MDN Web APIs)
- Element: input event (MDN Web APIs)
- HTMLInputElement: value property (MDN Web APIs)
- Event: preventDefault() method (MDN Web APIs)
- HTMLFormElement: requestSubmit() method (MDN Web APIs)
- HTMLCollection (MDN Web APIs)
- HTMLFormControlsCollection (MDN Web APIs)
- Event bubbling (MDN Learn web development)
- Event: eventPhase property (MDN Web APIs)
- Event: Event() constructor (MDN Web APIs)
- Event: target property (MDN Web APIs)
- Event: stopPropagation() method (MDN Web APIs)
- Element: closest() method (MDN Web APIs)
- Node: contains() method (MDN Web APIs)
- ARIA: aria-current attribute (MDN Accessibility)
- HTMLImageElement: alt property (MDN Web APIs)
- Keyboard event key values (MDN Web APIs)
- data: URLs (MDN URI reference)
- MDN: JavaScript execution model
- Using promises (MDN JavaScript Guide)
- await (MDN JavaScript reference)
- async function (MDN JavaScript reference)
- MDN: Window.queueMicrotask()
- Promise.all() (MDN JavaScript reference)
- Promise.allSettled() (MDN JavaScript reference)
- Introducing asynchronous JavaScript (MDN Learn web development)
- How to use promises: async and await (MDN Learn web development)
- Promise.prototype.then() (MDN JavaScript reference)
- Promise.prototype.finally() (MDN JavaScript reference)
- Promise.any() (MDN JavaScript reference)
- Promise.race() (MDN JavaScript reference)
- AggregateError (MDN)
- How to implement a promise-based API (MDN Learn)
- Promise() constructor (MDN JavaScript reference)
- Promise.withResolvers() (MDN JavaScript reference)
- Promise.try() (MDN JavaScript reference)
- util.parseArgs([config]) (Node.js v24 documentation)
- Timers Promises API (Node.js v24 documentation)
- process.argv and process.exitCode (Node.js v24 documentation)
- Window: setInterval() method (MDN Web APIs)
- Window: clearInterval() method (MDN Web APIs)
- HTMLButtonElement: disabled property (MDN Web APIs)
- Inheritance and the prototype chain (MDN JavaScript Guide)
- Object.create() (MDN JavaScript reference)
- Object.getPrototypeOf() (MDN JavaScript reference)
- Using classes (MDN JavaScript Guide)
- Classes (MDN JavaScript reference)
- constructor (MDN JavaScript reference)
- new (MDN JavaScript reference)
- instanceof (MDN JavaScript reference)
- extends (MDN JavaScript reference)
- super (MDN JavaScript reference)
- Private elements (MDN JavaScript reference)
- get (MDN JavaScript reference)
- set (MDN JavaScript reference)
- static (MDN JavaScript reference)
- throw (MDN)
- import (MDN JavaScript reference)
- export (MDN JavaScript reference)
- Modules: Packages (Node.js v24 documentation)
- Modules: ECMAScript modules (Node.js v24 documentation)
- npm-install (npm Docs, npm 11)
- package.json (npm Docs, npm 11)
- package-lock.json (npm Docs, npm 11)
- npm-ci (npm Docs, npm 11)
- npm-run (npm Docs, npm 11)
- scripts (npm Docs, npm 11)
- File system: fsPromises.readFile and writeFile (Node.js v24 documentation)
- Error (MDN)
- Error() constructor (MDN)
- Error: cause (MDN)
- console: trace() static method (MDN)
- console: assert() static method (MDN)
- Command-line API: --inspect-brk (Node.js v24 documentation)
- Test runner (Node.js v24 documentation)
- Assert (Node.js v24 documentation)
- Keyed collections (MDN JavaScript Guide)
- Map (MDN JavaScript reference)
- Set (MDN JavaScript reference)
- Map.groupBy() (MDN JavaScript reference)
- Map.prototype.getOrInsert() (MDN JavaScript reference)
- Object.fromEntries() (MDN JavaScript reference)
- Regular expressions (MDN JavaScript Guide)
- RegExp.escape() (MDN JavaScript reference)
- String.prototype.matchAll() (MDN JavaScript reference)
- String.prototype.replace() (MDN JavaScript reference)
- String.prototype.replaceAll() (MDN JavaScript reference)
- Named capturing group: (?<name>...) (MDN JavaScript reference)
- Representing dates & times (MDN JavaScript Guide)
- Date (MDN JavaScript reference)
- Date() constructor (MDN JavaScript reference)
- Date.UTC() (MDN JavaScript reference)
- Date.prototype.toISOString() (MDN JavaScript reference)
- Temporal (MDN JavaScript reference)
- Internationalization (MDN JavaScript Guide)
- Intl.NumberFormat() constructor (MDN JavaScript reference)
- Intl.DateTimeFormat() constructor (MDN JavaScript reference)
- Intl.RelativeTimeFormat() constructor (MDN JavaScript reference)
- Intl.PluralRules (MDN JavaScript reference)
- Intl.ListFormat (MDN JavaScript reference)
- Number.prototype.toLocaleString() (MDN JavaScript reference)
- RegExp.prototype.exec() (MDN JavaScript reference)
- Date.prototype.getUTCHours() (MDN JavaScript reference)
- Using the Fetch API (MDN)
- Window: fetch() method (MDN)
- Response: ok property (MDN)
- Response: json() method (MDN)
- Global objects: localStorage (Node.js v24 documentation)
- AbortSignal: timeout() static method (MDN)
- AbortSignal (MDN)
- AbortController (MDN)
- AbortSignal: any() static method (MDN)
- Client-side storage (MDN Learn)
- Window: localStorage property (MDN)
- Storage: getItem() method (MDN)
- Storage: setItem() method (MDN)
- Web Storage API (MDN)
- Window: storage event (MDN)
- IndexedDB API (MDN)