标签: javascript number-formatting intl
new Intl.NumberFormat('en-IN', { maximumFractionDigits: 2 }).format(-4.125)
这将返回-4.13,而round(-4.125, 2)返回的正确值是-4.12,四舍五入为较高的值,更接近于0
round(-4.125, 2)