Published
- 1 min read
javascript show 2 decimal places
The solution for this is noted below
javascript show 2 decimal places
Solution
var myNumber = 12.2345
var myNumberWithTwoDecimalPlaces = parseFloat(myNumber).toFixed(2) //12.23
Try other methods by searching on the site. That is if this doesn’t work