Intermediate · Free · In your browser

Learn JavaScript Intermediate

Go beyond the basics. Master closures and higher-order functions, work with Maps, Sets, and generators, design classes with private fields and inheritance, write custom errors and tests, handle dates, text, and international formats, use promises and async/await, and build a state store like the ones behind modern web apps.

20 lessons6 modules4 hours of practice4 challenges
Start the JavaScript Intermediate course →

No installation. Your code runs right in the browser. Finish JavaScript Foundations first, or be comfortable with functions, arrays, objects, and loops.

What you will be able to do

Course outline

Module 1

Functions, deeper

Closures, higher-order functions, memoization, and recursion.

  1. Functions that rememberClosures & private state · 10 min
  2. Functions that take functionsHigher-order functions: pipe & once · 10 min
  3. Remember expensive resultsMemoization with Map · 10 min
  4. Solve it by solving a smaller oneRecursion on nested data · 11 min
Module 2

Work with collections

Maps and Sets, reshaping objects, missing data, and generators.

  1. Maps and SetsUnique values, lookups & counting · 10 min
  2. Reshape objectsObject.entries, fromEntries & immutability · 10 min
  3. Handle missing data gracefullyOptional chaining ?. & nullish ?? · 9 min
  4. Lazy sequencesIterators & generator functions · 11 min
Module 3

Classes and objects

Classes, private fields, inheritance, and a shopping cart project.

  1. Classesclass, constructor & methods · 11 min
  2. Guarded propertiesGetters, setters & #private fields · 11 min
  3. Share behaviour with inheritanceextends, super & overriding · 11 min
  4. Project: a shopping cartFoundation project · classes, validation & money · 20 min
Module 4

Reliable code

Custom errors, tests for your own code, and immutable updates.

  1. Errors with meaningCustom Error classes & error.cause · 10 min
  2. Test your own codeAssertions & edge cases · 12 min
  3. Changes without surprisesImmutable updates & Object.freeze · 11 min
Module 5

Real-world data

Dates in UTC, regular expressions, and international formatting.

  1. Dates without time-zone bugsDate, UTC & calendar arithmetic · 11 min
  2. Parse text with named groupsRegular expressions, groups & matchAll · 11 min
  3. Format for peopleIntl.NumberFormat, dates & localeCompare · 10 min
Module 6

Asynchronous programs

Promises and async/await, and a state store capstone.

  1. Wait for things: promises and asyncPromises, async/await, retries & timeouts · 13 min
  2. Capstone: a state storeCapstone · closures, immutability, events & errors · 28 min

Ready for your first line?

Every lesson is short, hands-on, and checked automatically.

Start learning JavaScript Intermediate →