Javascript String capitalizeFirst()

Description

Javascript String capitalizeFirst()


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

Javascript String capitalizeFirst()

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

Javascript String capitalizeFirst()

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

Javascript String capitalizeFirst()

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



PreviousNext

Related