Command Palette

Search for a command to run...

Hectal
Phase 12: Modules and Tooling
JavaScript · Exercise 3 of 6 PreviousNext
Intermediate

From TypeScript to JavaScript

The JavaScript tab actually contains TypeScript, so the browser fails with a SyntaxError. Do the compiler's job by hand: remove every type so it becomes plain JavaScript that works the same.

The page should show Total: Rs 310, and cartTotal must still work for any list of items.

What Check tests

  1. No errors in the console
  2. The page shows Total: Rs 310
  3. cartTotal still works for other items
  4. The interface is gone

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.