Lesson overview · Free interview practice

Web APIs

Learn essential browser APIs and standards.

Topics in the full lesson
  • Introduction to Browser APIs and Web Standards
  • DOM Manipulation
  • The Fetch API
  • WebSockets
  • Additional Browser APIs
  • Web Standards and Best Practices
  • Practical Examples
  • Exercises

Practice Problems

Work through a question before revealing its explanation. These questions and answers are free; Premium adds the full lesson walkthrough, examples and implementation detail.

Completion marks record your own progress, not an automatically checked result. The task type does not determine whether it is optional.

TheoryEasy

WebSockets vs HTTP: When Real-Time Bi-Directional Matters

Question

What are WebSockets and when should you reach for them over HTTP polling or SSE?

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

TheoryMedium

The DOM API: Selection, Mutation, Traversal

Question

What is the DOM and what are the canonical APIs for selecting, creating, and mutating elements?

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

TheoryMedium

BroadcastChannel: Cross-Tab Same-Origin Messaging

Question

How do you communicate between tabs/windows of the same origin, and what are the trade-offs?

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

TheoryMedium

The Fetch API: Promise-Based HTTP with Streaming and AbortSignal

Question

How does the Fetch API work, and what does it offer over XMLHttpRequest?

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

TheoryMedium

Fetch Error Handling: HTTP-Error vs Network-Error

Question

How do you handle errors with Fetch, given that 4xx/5xx do not reject the promise?

Take a moment to think about this before revealing the answer

Explain your reasoning or try an implementation before comparing answers.

Explore the full Web APIs material

Premium includes the complete lessons and implementation references. Free practice questions remain available without a subscription.

All course tracks & premium content
From basics to advanced masterclasses
Built for JS/TS developers like you
Real-world tips & common pitfalls
Upgrade to Premium