Prices from a Form
JavaScript
10 pts
Prices from a Form
Two prices came from a form as text. Create:
wrong: the two texts joined with+(to see the problem),total: the real sum, after converting both withNumber().
Print wrong, total and typeof total. Expected output:
1525 40 number
Checklist
- Create
wrongby joining the two texts. - Create
totalby converting both values first. - Print
wrong,totaland the type oftotal.
🔑 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.
