Home / JavaScript Intermediate
JavaScript Intermediate
Closures, prototypes, classes, modules, promises, async code, the event loop, and fetch. Every example runs live, and three capstone projects close the course.
JavaScript Beginner taught the parts. This course teaches how the parts behave when they meet real programs. Fifty lessons cover closures, prototypes, classes, modules, promises, async code, the event loop, fetch, and three small projects that tie them together.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Closures
- JavaScript Closures
- JavaScript Closures Capture Variables
- JavaScript The var-in-a-Loop Trap
- JavaScript Private State with Closures
- JavaScript Debounce with a Closure
- JavaScript Stale Closures
Hoisting and Scope
- JavaScript Hoisting
- JavaScript The Temporal Dead Zone
- JavaScript Block Scope in Depth
- JavaScript Immediately Invoked Functions
Destructuring
- JavaScript Destructuring Objects
- JavaScript Destructuring Arrays
- JavaScript Destructuring Defaults and Renaming
- JavaScript Destructuring in Function Parameters
Prototypes and this
- JavaScript Prototypes
- JavaScript The Prototype Chain
- JavaScript How this Is Decided
- JavaScript call, apply, and bind
- JavaScript Object.create
Classes in Depth
- JavaScript Class Fields
- JavaScript Private Class Fields
- JavaScript Static Members
- JavaScript Getters and Setters
Modules
- JavaScript Modules
- JavaScript Named and Default Exports
- JavaScript Modules in the Browser
- JavaScript Dynamic import
Promises
- JavaScript Promises
- JavaScript Chaining Promises
- JavaScript Promise.all and Friends
- JavaScript Promise Failure
- JavaScript Creating Promises
Async and Await
- JavaScript async Functions
- JavaScript await in Depth
- JavaScript Errors in async Functions
- JavaScript Async Patterns
The Event Loop
Start: JavaScript The Event Loop ❯Fetch and JSON
- JavaScript fetch
- JavaScript Sending Data with fetch
- JavaScript Fetch Errors
- JavaScript JSON in Depth
Advanced Functions
- JavaScript Rest Parameters
- JavaScript Higher-Order Functions
- JavaScript Currying and Partial Application
- JavaScript Generators
Capstone Projects
- JavaScript Project: Shopping Cart
- JavaScript Project: Async Dashboard
- JavaScript Project: Debounced Search
Learn JavaScript Intermediate
JavaScript Beginner covered statements, variables, functions, arrays, objects, and the DOM. Those pieces work on their own. The intermediate course starts where they stop working on their own: a function that remembers a value after it returns, a method that loses its object, a promise that settles later than the code around it.
Closures open the course because they explain so much of what follows. A closure is a function that keeps hold of the variables around it. Once that idea is in place, private state, debouncing, and the stale-value trap all follow from it. Hoisting and the temporal dead zone come next, then destructuring, prototypes, and the rules for this.
The second half is the asynchronous half. Promises, async functions, and the event loop explain how JavaScript handles work that finishes later. Fetch turns that into real data loading, and three capstone projects — a shopping cart, an async dashboard, and a debounced search — put the ideas to work together. Twelve groups hold the 50 lessons.
What you will learn
From a first closure to a working async dashboard, the lessons train you to:
- Build closures that remember values between calls
- Spot the var-in-a-loop trap and fix it with let
- Hide state inside a function and expose it through methods
- Read a variable before its line and explain why it fails
- Name the temporal dead zone and say what lives inside it
- Pull values out of objects and arrays with destructuring
- Trace a missing property up the prototype chain
- Decide what this refers to from the call, not the definition
- Write classes with private fields, static members, and getters
- Load modules on demand with dynamic import
- Chain promises, catch their failures, and await them in order
- Explain the event loop, fetch data, and debounce a search box
Who this JavaScript course is for
This course assumes the Beginner course, or its equivalent. Readers should already write functions, use arrays and objects, and change a page through the DOM. Nothing here re-teaches those pieces.
Lesson time totals 308 minutes, just over five hours. The work is denser than the beginner course, so a group a day is a steady pace. The capstone projects at the end reward readers who build along rather than only reading.
Front-end developers get the most from it. Closures, modules, promises, and the event loop are the ideas behind everyday framework code. Interview candidates get the same benefit: closures, promises, async and await, the event loop, and destructuring are the questions this course now answers with lessons behind them.
How this course works
Code on these pages executes in the browser as you read. Every example runs while you read, so the output printed next to the code comes from a live run, not from a picture. A fetch lesson loads from a data address, so it works offline and gives the same result every time.
Modules are taught with dynamic import, which the preview can run. Static import and export forms appear in a reference table, since a classic script cannot carry them. Timers in the event-loop lessons run at 100 milliseconds or less, so the order of the lines is visible without waiting.
Exercises close all 50 lessons, each with four options and an answer that explains the reasoning. Progress is kept in the browser on this device. The course is free, and nothing needs installing.
Frequently asked questions
What does JavaScript Intermediate add after JavaScript Beginner?
The behaviour behind the syntax. Closures, prototypes, the rules for this, modules, promises, async functions, the event loop, and fetch. Beginner taught the parts. This course teaches how they act when a program grows past one screen.
Do I need to finish JavaScript Beginner first?
Yes, or know its ground already. This course starts from functions, arrays, objects, and the DOM without re-teaching them. A reader who cannot yet write a function will find the first closure lesson hard going.
How long does the JavaScript Intermediate course take?
The 50 lessons hold 308 minutes of material, just over five hours. Working the exercises and the three capstone projects takes longer still. Twelve groups at one a day finish the course in twelve days.
Why do the fetch lessons use data addresses?
A data address keeps the lesson offline and deterministic. The fetch still runs for real, returns a real response, and resolves with real JSON. The only difference from a web address is that the data travels with the page instead of across a network.
What is the temporal dead zone?
The stretch of code between the start of a block and the line that declares a let or const variable. Reading the variable inside that stretch throws a ReferenceError. The course names the zone in its own lesson and shows the exact error message.
What should follow JavaScript Intermediate?
TypeScript Intermediate adds a type system to the JavaScript you now know, in 42 lessons. Python Intermediate opens a second language at the same level, in 52 lessons. Readers aiming at interviews can move to DSA Beginner, 100 lessons on the foundations behind the questions.
Next steps
- TypeScript Intermediate ❯ — The same JavaScript, with a type system on top, taught in 42 lessons.
- Python Intermediate ❯ — A second language at the same level, in 52 lessons that build programs that do real jobs.
- DSA Beginner ❯ — Interview foundations in 100 lessons: complexity, arrays, hash maps, trees, graphs, and first dynamic programming.