PHP Function:
function formatNumberForDisplay($number, $decimal=0, $decimalSeperator='.', $numberSeperator=',') { return number_format($number, $decimal, $decimalSeperator, $numberSeperator); }
Can anybody suggest to me the equivalent functionality in jQuery/JavaScript?
Advertisement
Answer
is this what you’d like to get?
yourFloatVarHere.toFixed(2);
voilĂ .