I’m having trouble getting my answer to return in the correct format for currency. I’ve learned about the toFixed() method so you can use .toFixed(2) to display 50 cents as
["0.50"] but it’s a string and it’s supposed to be a number format like
[0.50] for your answer.
If I convert to a number with
var change = 0.5;
Results back to displaying
0.5 . I’ve also tried Number.parseFloat() but anytime I convert to a number it drops the zero off the end.
Is there an easy way to simply display as a number with an extra decimal place?
Thank you in advance for any help with this!!