Learn JavaScript

A structured guide to JavaScript, from the language fundamentals to asynchronous code, the browser, Node.js, TypeScript, and the tools around them.

Start learning JavaScript

Welcome

Start with what JavaScript is, where it runs, and how to write a first program.

JavaScript Basics

Learn the values, variables, and type checks you use in everyday JavaScript.

Strings & Regular Expressions

Work with text, from ordinary strings and template literals to regular expressions.

Operators

See how JavaScript calculates, compares, and combines values, including the operators that handle missing data.

Control Flow

Choose paths through a program with conditions, switches, and error handling.

Loops & Iteration

Repeat work with loops, iterators, and generators.

Data Structures

Store and reshape data with arrays, objects, maps, sets, and JSON.

Functions

Define functions, bind this, and pass behavior around with closures and higher-order functions.

Objects & Prototypes

Understand how JavaScript objects share behavior through prototypes, and how to inspect them.

Classes & Modules

Organize code with classes, inheritance, and modules.

Asynchronous JavaScript

Handle work that finishes later, from callbacks and promises to async/await and the event loop.

Advanced Concurrency

Look at workers, shared memory, and the other tools JavaScript uses for concurrent work.

DOM & Browser APIs

Use JavaScript in the browser to work with the page, network, storage, and other web APIs.

Node.js

Run JavaScript outside the browser, including files, HTTP, and Node's own module system.

Tooling

Set up the packages, bundlers, and formatters that surround a JavaScript project.

Testing & Debugging

Check behavior with tests and find problems with the console, browser tools, and the Node debugger.

Security

Recognize the common browser and dependency risks that show up in JavaScript applications.

Performance & Memory

See how JavaScript uses memory and what makes a page or script feel slow.

JavaScript Engines & Internals

Follow how an engine runs your code, from the call stack to the optimizations it tries.

Patterns & Architecture

Structure larger programs with the patterns JavaScript projects commonly use.

TypeScript

Add static types to JavaScript and see how TypeScript describes functions, objects, and modules.

Interoperability

Connect JavaScript to WebAssembly, native addons, and the two module systems still in use.

Framework Ecosystem (Overview)

Get a practical overview of React, Vue, Angular, and Svelte without treating any one of them as the language.

Error Handling

Recognize JavaScript's error types and decide how to report and log failures.

Core Rules of Thumb

Apply the habits that keep everyday JavaScript clear: block scope, explicit types, and small functions.

Appendix

Use the glossary, style notes, and migration guides when you need a reference rather than a lesson.