JavaScript curriculum
JavaScript
13 lessons ready
Make pages come alive: variables, functions, the DOM, async code.
Beginner
Variables
Store values with let and const, and print them with console.log.
7 minFree preview
Data types
Numbers, strings, booleans and friends, plus how to check what type a value is.
7 minFree preview
Making decisions with if
Run different code depending on a condition using if, else and comparison operators.
7 min Account
Loops
Repeat code with for and while loops instead of copying and pasting.
7 min Account
Functions
Wrap code in a named, reusable function with parameters and a return value.
8 min Account
Intermediate
Arrays
Lists of values, and the methods that add, remove, search and transform them.
9 min Account
Objects
Group related data with key-value pairs, read and change properties, and loop over them.
8 min Account
The DOM
Select elements on a page and change their text, style and structure with JavaScript.
9 min Account
Events
React to clicks, key presses and form input with addEventListener.
8 min Account
Advanced
Async and await
Write code that waits for slow things without freezing the page, using promises and async functions.
9 min Account
Fetch and APIs
Get data from a server with fetch, read JSON, and handle errors and loading states.
9 min Account
Modern ES6+ features
Destructuring, spread, template strings, default parameters, optional chaining and more.
9 min Account
Error handling
try, catch, finally and throw: handle problems without crashing, and raise your own errors.
8 min Account