JSJavaScript

Learn JavaScript – all lessons

16 lessons from beginner to advanced, building on each other and with code examples.

Beginner
1

Hello World & console.log

Your first program, comments and output.

2

Variables & Data Types

let, const, the primitive types and conversions.

3

Conditions & Comparisons

if, switch, === instead of ==, truthy/falsy and the operators ?? and ?.

4

Loops

for, for...of, for...in, while, break and continue.

5

Functions

Declarations, arrow functions, default values and rest parameters.

6

Arrays, Objects, Map & Set

The most important data structures – and what const really means.

Intermediate
7

Array Methods: map, filter, reduce

Transforming data functionally – everyday JavaScript.

8

Destructuring, Spread & Rest

Unpacking, copying and merging values.

9

Strings, Regex & JSON

Processing text, searching for patterns and exchanging data.

10

Error Handling

try/catch/finally, custom error classes and typical error types.

11

Classes & Object-Oriented Programming

class, extends, private fields, getters and prototypes.

12

DOM & Events in the Browser

Creating and changing elements and reacting to clicks.

Advanced
13

Closures, Scope & this

Why functions "take along" their environment and what this really means.

14

Asynchronous Programming

Event loop, promises, async/await and typical pitfalls.

15

Iterators & Generators

Making your own collections iterable and producing values lazily.

16

Modules, npm & Tooling

ES modules, package.json, bundlers and quality tools.