JavaScript / Intermediate: modules and asynchronous contracts

JavaScript β€” Intermediate: modules and asynchronous contracts

Connect modules, promises, async workflows, tests, iteration, and prototype behavior through explicit contracts.

6 lessons Β· No account required

What you will learn

  • Own dependencies, errors, and asynchronous completion.
  • Test iteration and stateful behavior through public operations.
  1. Modules and explicit dependency boundaries

    Organize calculations and browser adapters with ECMAScript modules. Follow named exports, live bindings, resolution, and host-specific loading without confusing packages with language syntax.

    Start learning
  2. Promises and asynchronous composition

    Model a future result without confusing it with a running thread. Trace promise states, chaining, rejection, and aggregate results using deterministic local operations.

    Start learning
  3. Async workflows, sequencing, and cleanup

    Use async and await to express dependencies without losing concurrency or errors. Compare sequential work, independent work, and cleanup around a controlled local failure.

    Start learning
  4. Error contracts and meaningful tests

    Design validation and error propagation as part of an API. Build small deterministic tests that check independent expected values, rejection behavior, and state rather than only executed lines.

    Start learning
  5. Iteration protocols and lazy sequences

    Separate iterable data from the cursor that consumes it. Build bounded generators and reason about laziness, exhaustion, early exit, and collection semantics.

    Start learning
  6. Prototypes, classes, and receiver behavior

    Follow property lookup and this through ordinary objects and classes. Share behavior intentionally while protecting invariants and avoiding accidental changes to global prototypes.

    Start learning
Back to course