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
- No errors in the console
- The page shows
Total: Rs 310 cartTotalstill works for other items- The
interfaceis 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.