+ 3
If you want 2 to look like 2.00, you can do it with toFixed(2): It. will always display 2 decimal points, no matter what their values are (2).toFixed(2) // 2.00 (2.5).toFixed(2) // 2.50 (2.555).toFixed(2) // 2.56, because it rounds up
8th Jun 2019, 9:55 AM
Airree
Airree - avatar