Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Programming languages

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 to read 14 modules

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

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.

  1. 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.

    1. JavaScript, ECMAScript and where code runs Beginner Free lesson, Pro answers: 14 minutes
    2. Run JavaScript in the browser, the runner and Node Beginner Free lesson, Pro answers: 16 minutes
    3. The console and reading error messages Beginner Free lesson, Pro answers: 16 minutes
    4. Statements, semicolons, comments and strict mode Beginner Free lesson, Pro answers: 16 minutes
    5. JavaScript for Python developers Beginner Free lesson, Pro answers: 25 minutes
    6. JavaScript for Java developers Beginner Free lesson, Pro answers: 25 minutes
  2. 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.

    1. Variables with let and const Beginner Free lesson, Pro answers: 15 minutes
    2. Primitive types and typeof Beginner Free lesson, Pro answers: 14 minutes
    3. Numbers and floating-point arithmetic Beginner Free lesson, Pro answers: 22 minutes
    4. Math, rounding and random numbers Beginner Free lesson, Pro answers: 22 minutes
    5. BigInt for arbitrarily large integers Intermediate Free lesson, Pro answers: 18 minutes
    6. Strings and template literals Beginner Free lesson, Pro answers: 18 minutes
    7. Booleans, truthy and falsy values Beginner Free lesson, Pro answers: 15 minutes
    8. null, undefined, optional chaining and ?? Beginner Free lesson, Pro answers: 18 minutes
    9. Type conversion and coercion Beginner Free lesson, Pro answers: 22 minutes
    10. Equality: ==, === and Object.is Beginner Free lesson, Pro answers: 20 minutes
    11. Operators, short-circuiting and precedence Beginner Free lesson, Pro answers: 20 minutes
  3. 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.

    1. Conditionals: if, else and the ternary operator Beginner Free lesson, Pro answers: 16 minutes
    2. switch statements and lookup tables Beginner Free lesson, Pro answers: 15 minutes
    3. Loops: for, while, do…while, break and continue Beginner Free lesson, Pro answers: 18 minutes
    4. for…of vs for…in Beginner Free lesson, Pro answers: 16 minutes
  4. 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.

    1. Function declarations, expressions and return values Beginner Free lesson, Pro answers: 20 minutes
    2. Parameters, defaults and rest parameters Beginner Free lesson, Pro answers: 16 minutes
    3. Arrow functions Beginner Free lesson, Pro answers: 15 minutes
    4. Scope, the scope chain and execution contexts Intermediate Free lesson, Pro answers: 22 minutes
    5. Hoisting, var and the temporal dead zone Intermediate Free lesson, Pro answers: 22 minutes
    6. Closures in JavaScript Intermediate Free lesson, Pro answers: 22 minutes
    7. Higher-order functions and callbacks Intermediate Free lesson, Pro answers: 20 minutes
    8. Recursion and the call stack Intermediate Free lesson, Pro answers: 22 minutes
  5. 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.

    1. Object literals, properties and methods Beginner Free lesson, Pro answers: 16 minutes
    2. References, copying and structuredClone Beginner Free lesson, Pro answers: 18 minutes
    3. Methods and the this keyword Intermediate Free lesson, Pro answers: 20 minutes
    4. call, apply and bind Intermediate Free lesson, Pro answers: 18 minutes
    5. Object.keys, entries, fromEntries and key order Beginner Free lesson, Pro answers: 15 minutes
    6. Destructuring objects and arrays Beginner Free lesson, Pro answers: 18 minutes
  6. 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.

    1. Arrays: creating, reading and length Beginner Free lesson, Pro answers: 15 minutes
    2. Adding and removing items Beginner Free lesson, Pro answers: 15 minutes
    3. Searching: includes, indexOf, find, some and every Beginner Free lesson, Pro answers: 14 minutes
    4. Transforming arrays with map, filter and forEach Beginner Free lesson, Pro answers: 15 minutes
    5. reduce in depth Intermediate Free lesson, Pro answers: 25 minutes
    6. Sorting arrays correctly Intermediate Free lesson, Pro answers: 20 minutes
    7. Copying array methods: toSorted, toSpliced, with Beginner Free lesson, Pro answers: 15 minutes
    8. flat, flatMap, Array.from and array-likes Beginner Free lesson, Pro answers: 15 minutes
    9. Grouping data with Object.groupBy and Map.groupBy Intermediate Free lesson, Pro answers: 15 minutes
  7. 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.

    1. Regular expressions in JavaScript Intermediate Free lesson, Pro answers: 25 minutes
    2. Modern regex features and RegExp.escape Advanced Free lesson, Pro answers: 25 minutes
    3. Text encoding, bytes and Base64 Intermediate Free lesson, Pro answers: 20 minutes
  8. 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.

    1. Map: keys of any type and the ES2026 upsert methods Intermediate Free lesson, Pro answers: 20 minutes
    2. Set and the ES2025 set methods Intermediate Free lesson, Pro answers: 18 minutes
    3. WeakMap, WeakSet, WeakRef and FinalizationRegistry Advanced Free lesson, Pro answers: 22 minutes
    4. Choosing between objects, arrays, Map and Set Intermediate Free lesson, Pro answers: 18 minutes
  9. 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.

    1. try, catch, finally and throw Beginner Free lesson, Pro answers: 17 minutes
    2. Built-in error types and engine messages Beginner Free lesson, Pro answers: 18 minutes
    3. Custom errors, error cause and Error.isError Intermediate Free lesson, Pro answers: 19 minutes
    4. Debugging in DevTools and Node Intermediate Free lesson, Pro answers: 22 minutes
  10. 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.

    1. The iteration protocols Intermediate Free lesson, Pro answers: 18 minutes
    2. Generator functions Intermediate Free lesson, Pro answers: 18 minutes
    3. Two-way generators: next, return, throw, yield* Advanced Free lesson, Pro answers: 22 minutes
    4. Iterator helpers: lazy map, filter, take and more Intermediate Free lesson, Pro answers: 18 minutes
    5. Combining iterators: concat, zip, chunks and join Advanced Free lesson, Pro answers: 20 minutes
  11. 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.

    1. Prototypes and the prototype chain Intermediate Free lesson, Pro answers: 20 minutes
    2. Constructor functions and the new operator Intermediate Free lesson, Pro answers: 18 minutes
    3. Private fields, methods and brand checks Intermediate Free lesson, Pro answers: 20 minutes
    4. Extending built-ins: Array, Error and Map Advanced Free lesson, Pro answers: 20 minutes
    5. instanceof, duck typing and cross-realm checks Advanced Free lesson, Pro answers: 20 minutes
    6. Composition, mixins and OOP design in JavaScript Intermediate Free lesson, Pro answers: 22 minutes
  12. 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.

    1. ES modules: import and export Beginner Free lesson, Pro answers: 20 minutes
    2. CommonJS, require(esm) and dual packages in Node Intermediate Free lesson, Pro answers: 22 minutes
    3. npm, semver, lockfiles and supply-chain safety Intermediate Free lesson, Pro answers: 24 minutes
    4. Bundlers, transpilers, polyfills and Baseline Intermediate Free lesson, Pro answers: 24 minutes
    5. Designing module boundaries and public APIs Intermediate Free lesson, Pro answers: 22 minutes
  13. Module 13

    Asynchronous JavaScript

    Callbacks, timers, promises and their combinators, async functions, error handling, cancellation with AbortController, async iterators, limits and retries.

    1. Synchronous and asynchronous code Beginner Free lesson, Pro answers: 18 minutes
    2. Callbacks and error-first style Beginner Free core, Pro depth: 8 of 25 minutes free
  14. Module 15

    The DOM

    How browsers load scripts, selecting and changing elements safely, attributes, classes and styles, sizes and scrolling, large lists and MutationObserver.

    1. How browsers load and run scripts Beginner Free lesson, Pro answers: 20 minutes
    2. The DOM tree and selecting elements Beginner Free core, Pro depth: 8 of 22 minutes free

Related tools

Official documentation

More in Programming languages

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.