You may use second argument to provide some options. In your case, with default locale:
number.toLocaleString(undefined, { minimumFractionDigits: 4 })
You may use second argument to provide some options. In your case, with default locale:
number.toLocaleString(undefined, { minimumFractionDigits: 4 })