Wednesday, February 12, 2020

Use .toFixed in JavaScript to round a number to two decimal places!

This has this example:

var num = 5.56789;
var n = num.toFixed(2);

No comments:

Post a Comment