Market Numbers
JavaScript
10 pts
Market Numbers
Use the variables from the starter.
- Create
cost=kg * pricePerKgand print"Cost:"andcost. bagsis text. CreatebagCost=bags * bagPriceand print"Bags:"andbagCost.- Create
joined=bags + bagPriceto see the bug, and print"Joined:"andjoined. - Print the type of
joined.
Expected output:
Cost: 100 Bags: 15 Joined: 35 string
Checklist
- Create
costandbagCostby multiplying. - Create
joinedwith+. - Calculate everything and print the type of
joined. - The four lines match.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
