Web developmentLearning library

JavaScript and TypeScript

Learn the enduring JavaScript runtime model before adding TypeScript checks. Browser APIs and compiler settings evolve, so examples must record the target runtime and tool versions.

Beginner15 chapters11 practice questions5 references
Start coursePractise questions

Get an in-app notice when new lessons or practice are added.

15 chapters across 5 modules

Course chapters

Explore all 15 chapters in any order. Each chapter has learning goals, a practice prompt, and a primary reference; expanded reading pages are linked from their chapter titles.

01 · Values and execution3 chapters
  1. Values, equality, and coercion

    • Predict primitive equality and conversion without relying on accidental coercion

    Practice: Build a truth table for null, undefined, zero, empty text, and arrays.

    Read the primary referenceLesson guide · Ready
  2. Scope, closures, and functions

    • Explain which binding a closure reads after its outer function returns

    Practice: Implement independent counters and test their isolation.

    Read the primary referenceLesson guide · Ready
  3. Values and asynchronous boundaries

    Separate JavaScript runtime behavior from TypeScript checking.

    • Distinguish synchronous evaluation, promise continuation, and untrusted result data

    Practice: Trace output order and validate a delayed result before displaying it.

    Read the primary referenceExpanded reading · Ready
02 · Collections and modules3 chapters
  1. Objects, arrays, and identity

    • Distinguish shared references from copied collection structure

    Practice: Update a nested settings object without mutating the input.

    Read the primary referenceLesson guide · Ready
  2. Iteration and transformations

    • Choose a readable iteration strategy for a data transformation

    Practice: Normalize records, reject malformed entries, and group valid results.

    Read the primary referenceLesson guide · Ready
  3. Modules and dependency boundaries

    • Separate exported behavior from module-private state

    Practice: Split parsing, domain logic, and rendering into separate modules.

    Read the primary referenceLesson guide · Ready
03 · Browser interaction3 chapters
  1. DOM and event propagation

    • Explain targets, listeners, and propagation in a real interface

    Practice: Create keyboard-operable topic filters using native controls.

    Read the primary referenceLesson guide · Ready
  2. Promises, async, and failure

    • Distinguish a rejected request from a successful response with an error status

    Practice: Render loading, empty, success, and failure states for a local data request.

    Read the primary referenceLesson guide · Ready
  3. Cancellation and stale responses

    • Prevent an older response from replacing the newest search results

    Practice: Simulate out-of-order requests and apply cancellation or request identity checks.

    Read the primary referenceLesson guide · Ready
04 · TypeScript as a checking layer3 chapters
  1. Inference, unions, and narrowing

    • Use control flow to narrow values rather than overriding the checker

    Practice: Model a request state as a discriminated union and render every case.

    Read the primary referenceLesson guide · Ready
  2. Unknown data and runtime validation

    • Explain why a type annotation cannot validate received JSON

    Practice: Parse an unknown record into a checked lesson model with useful errors.

    Read the primary referenceLesson guide · Ready
  3. Generics and strict configuration

    • Preserve relationships between inputs and outputs with a small generic API

    Practice: Write a typed grouping helper and enable strict checking in a sample project.

    Read the primary referenceLesson guide · Ready
05 · Reliable application code3 chapters
  1. Accessible forms and state

    • Keep validation messages and focus behavior understandable

    Practice: Implement a topic request form with associated labels and field errors.

    Read the primary referenceLesson guide · Ready
  2. Testing pure and asynchronous behavior

    • Control time and inputs without testing implementation details

    Practice: Test a query parser and a stale-response guard with deterministic inputs.

    Read the primary referenceLesson guide · Ready
  3. Build a topic finder

    • Integrate typed models, accessible events, and asynchronous state

    Practice: Deliver a small searchable catalog with no-results handling and request cleanup.

    Read the primary referenceLesson guide · Ready

Learn it. Check it. Try again.

11 original questions with worked explanations and source references. Filter by difficulty, revisit mistakes, and save your attempt as you go.

Open JavaScript and TypeScript practice

Books & references

Free reading at the publisher or author’s site. External materials keep their own licenses.

  • JavaScript GuideMDN Web Docs · documentation
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • ECMAScript language specificationEcma TC39 · standard
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • Asynchronous JavaScript learning moduleMDN Web Docs · course
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • TypeScript HandbookTypeScript team · documentation
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • TSConfig referenceTypeScript team · documentation
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.