Is there a way to get number.toLocaleString()
with 4 digits after the comma?
Example:
var number = 49.9712;
document.getElementById('id').innerText = number.toLocaleString();
Result: 49,9712
But now it always returns number with 2 digits after comma: 49,97