Hi I am stuck for idea on how to turn value like 0.5 to 0.50, I have tried to use toFixed(2) so the value is 2 decimal places but when I input that into the 2D array it becomes a string like this: [“QUARTER”,“0.50”], I have also tried to use parseFloat but the result is still a string. Thank you in advance.
xguardx
1
Don’t worry about the trailing zeroes. If the numbers are the same, then the test will pass.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
|
How to turn 0.5 into 0.50? While not turning into string? [Solved]
|
2 | 1152 | July 21, 2016 | |
| Exact Change : Trouble with toFixed(2) and number format | 4 | 8321 | November 10, 2017 | |
|
[help] FCC beta Challenge Cash register
|
8 | 3427 | January 4, 2018 | |
|
Exact Change, can't pass the two tests that test accuracy against an array - solved
|
3 | 960 | September 5, 2017 | |
|
Exact Change - comparison with zero (probably) not working
|
2 | 949 | March 1, 2018 |