Is there a way to get number.toLocaleString() with 4 digits after the comma?
number.toLocaleString()
Example:
var number = 49.9712; document.getElementById(\'id
If you need to use Locale settings than I don't think you'll be able to specify that you need 4 decimal places, but you can obviously do this using other prototype methods, such as toFixed().
Here's an example:
var number = 12.3456 number.toFixed(4)