Strange Numbers Lab
JavaScript
20 pts
Strange Numbers Lab
Create these variables and print each one (or its type) on its own line:
sum=0.1 + 0.2fixed= the same sum calculated with whole numbers:(0.1 * 10 + 0.2 * 10) / 10big= 1500 written in e-notation (1.5e3)bad="Keren" / 5, then printbadandtypeof badlimit=1 / 0
Expected output:
0.30000000000000004 0.3 1500 NaN number Infinity
Checklist
- Create
sumand the exactfixed. - Write
bigin e-notation. - Create the special values
badandlimit. - All six 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.
