Javascript String upperCaseFirstLetter()

Description

Javascript String upperCaseFirstLetter()


String.prototype.upperCaseFirstLetter = function () {
    return this.charAt(0).toUpperCase() + this.slice(1);
};

Javascript String uppercaseFirstLetter()

/******************************************************
 Make the first letter to ah capital letter.
******************************************************/
String.prototype.uppercaseFirstLetter = function() {
    return this.charAt(0).toUpperCase() + this.slice(1);
};

/******************************************************
 Make the first letter to ah cappital letter.
******************************************************/
String.prototype.lowercaseFirstLetter = function() {
    return this.charAt(0).toLowerCase() + this.slice(1);
};



PreviousNext

Related