Formats the value of an integer to the specified precision.

Syntax

JSV_commaFormat(expN [,delimiter])

Prototype

n/a

Returns

The commaFormat function returns the string representation of a number formatted to the specified precision.

Parameters

The commaFormat function uses the following arguments.

Argument Description
expN The number that is to be formatted.

Remarks

This function ...
Martin Webb
http://www.irt.org/

Dependencies

n/a

Example

The following lines of code

document.write(JSV_commaFormat(1)+'<BR>');
document.write(JSV_commaFormat(12)+'<BR>');
document.write(JSV_commaFormat(123)+'<BR>');
document.write(JSV_commaFormat(1234)+'<BR>');
document.write(JSV_commaFormat(12345)+'<BR>');
document.write(JSV_commaFormat(123456)+'<BR>');
document.write(JSV_commaFormat(1234567)+'<BR>');
document.write(JSV_commaFormat(12345678)+'<BR>');
document.write(JSV_commaFormat(123456789)+'<BR>');
document.write(JSV_commaFormat(1234567890)+'<BR>');

produce