commaNumber()

Turns a number into a string in its fullest form with commas separating the integral part at the thousands mark, millions mark, billions mark, etc.

This function is valid in v2.8.0 to v2.24.3. This function has been downloaded 87 times.

Parameter

{number|string} num
Number that will be converted to a string and will have commas added to it to separate the hundreds from thousands, the thousands from the millions, etc.

Returns

{string|undefined}
A string representation of num with commas separating the hundreds from thousands, the thousands from the millions, etc. If num is not a finite number undefined will be returned.

Required Function

This function directly requires the following function which is included automatically:

  • fullNumber()
    Takes a number in any form and returns it as a string in its fullest form (removing exponents).