Frontend Developer

Case File: The Price List That Never Loaded

A shop's price list comes from a service that answers a moment later, and sometimes does not answer at all. The page shows a blank table either way, so customers cannot tell loading from broken. Write the code that handles all three states: waiting, success and failure, with a retry button, and return the promise so that the page can wait for it. The lab calls your function and reads what the page shows, once for success and once for failure. The shop and the prices are generated for you alone.

60 min

Case File: The Price List That Never Loaded

A shop's price list comes from a service that answers a moment later, and sometimes does not answer at all. The page shows a blank table either way, so customers cannot tell loading from broken. Write the code that handles all three states: waiting, success and failure, with a retry button, and return the promise so that the page can wait for it. The lab calls your function and reads what the page shows, once for success and once for failure. The shop and the prices are generated for you alone.

In this lesson:

  • javascript
  • promises
  • async
  • fetch
  • error handling
  • loading states
  • case-file

๐Ÿ”’ This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans