Determines whether or not passed value is an integer.

Syntax

JSV_isInteger(expI [, signed])

Prototype

n/a

Returns

The isInteger function returns true if the expression expI contains an integer (signed or unsigned); otherwise, false.

Parameters

The isInteger function uses the following arguments.

Argument Description
expI A integer value.
signed Optional. Boolean value that indicates whether the integer should be evaluated as a signed (e.g., -23 or +34) or unsigned (e.g., 54) integer. Default value is true.

Remarks

n/a

Dependencies

JSV_toString, JSV_occurs, JSV_stripCharacters

Example

The following lines of code

var f = 54.87;
document.write( "The number " + f + " is an integer? " + JSV_isInteger(f) );
f = 54;
document.write( "The number " + f + " is an integer? " + JSV_isInteger(f) );

produce