Number.format
format($numDecimals = 0, $thousandsSep = ',', $decPoint = '.') -> string
Description
Format with the specificed thousands separator and decimal point character.
$num = 1234.56 $num.format() //= '1,234' $num.format(1) //= '1,234.6' $num.format(2, '') //= '1234.56' $num.format(2, ' ', ',') //= '1 234,56'