Determines whether or not all characters in a string are alphabetic characters.

Syntax

JSV_isAlphabetic(expS)

Prototype

expS.isAlphabetic()

Returns

The isAlphabetic function returns true if the expression expS contains only alphabetic characters; otherwise, false.

Parameters

The isAlphabetic function uses the following argument.

Argument Description
expS The character expression that is tested to contain alphabetic characters.

Remarks

Alphabetic characters include the letters a through z and A through Z.

Dependencies

JSV_isEmpty, JSV_stripCharacters

Example

The following lines of code

var string1 = "ABCDEF", string2 = "A2F3C77D";
document.write( string1 + 
    " only contains alphabetic characters? " +
    JSV_isAlphabetic(string1) );
document.write( string2 + 
    " only contains alphabetic characters? " +
    JSV_isAlphabetic(string2) );

produce