Beyond the core language, browsers expose a set of built-in Web APIs for talking to the outside world: fetching data over the network, storing information locally, and reading device or browser state. This module focuses on the ones you'll use in almost every project, especially the Fetch API and working with JSON and REST APIs.
By the end you'll be able to pull data from a real API and handle the responses (and errors) correctly. Work through these lessons in order, then move on to Version Control to start managing your code with Git.
The browser's built-in APIs at a glance, and how they differ from the APIs a server exposes.
Making network requests from the browser, and handling the promise-based response it returns.
Parsing and building JSON payloads, and moving data between JavaScript objects and API responses.
Persisting small amounts of data in the browser, and when to reach for each storage option.
Manipulating browser history and the URL bar without a full page reload — the basis of SPA routing.
Reading a user's location and other device signals, plus the permission prompts that come with them.
Detecting when an element enters the viewport — the API behind infinite scroll and lazy-loaded images.
Keeping a persistent connection open for live updates, and how it differs from a regular Fetch request.
Handling failed requests gracefully, and the conventions most REST APIs follow.
A written reference covering API design conventions and patterns — good for a quick lookup after watching the videos.
Article