Determines whether or not a character is an numeric character.
JSV_isDigit(expC)
expC.isDigit()
The isDigit function returns true if the expression expC is an numeric character; otherwise, false.
The isDigit function uses the following argument.
Argument | Description |
expC | The character expression that is tested to be a numeric character. |
Numeric characters include 0 through 9.
n/a
The following lines of code
var testString = "Ab1";
document.write( "The first character of " +
testString.bold() +
" is a digit? " +
JSV_isDigit(testString.charAt(0)) );
document.write( "The second character of " +
testString.bold() +
" is a digit? " +
JSV_isDigit(testString.charAt(1)) );
document.write( "The third character of " +
testString.bold() +
" is a digit? " +
JSV_isDigit(testString.charAt(2)) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.