JavaScript · Exercise 1 of 6Next
Beginner
Import from a module
The import map in the HTML tab defines a module called shop. It has a default export (the shop's name) and a named export withTax(price).
In the module script, write one import line that brings in both. Then show the shop's name in #name and the price of a 500 item with tax in #price, worked out by withTax (it should be 590).
What Check tests
- The heading shows the shop's name
- The price shows 590
- The values come from the module (nothing typed in by hand)
- No errors in the console
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.