📜  javascript tofixed - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:16.597000             🧑  作者: Mango

代码示例4
//round number to 2 digits
var num = 5.56789;
var n = num.toFixed(2);