📜  tofixed - Javascript 代码示例

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

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