See also: capitalize

Captitalizes the first character of a string.

Syntax

JSV_capitalizeFirstCharacter(expS)

Prototype

expS.capitalizeFirstCharacter()

Returns

The capitalizeFirstCharacter function returns the string with the first character in uppercase and all other characters in lowercase.

Parameters

The capitalizeFirstCharacter function uses the following arguments.

Argument Description
expS String containing the word to be capitalized.

Remarks

n/a

Dependencies

n/a

Example

The following lines of code

myStatement = "baWana";
document.write( JSV_capitalizeFirstCharacter(myStatement) );
var myStatement = "be there or be square";
document.write( JSV_capitalizeFirstCharacter(myStatement) );

produce