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.
What you will learn
- Own dependencies, errors, and asynchronous completion.
- Test iteration and stateful behavior through public operations.
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 learningPromises 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 learningAsync 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 learningError 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 learningIteration 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 learningPrototypes, 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