Convert first String letter to upper case - Node.js String

Node.js examples for String:Case

Description

Convert first String letter to upper case

Demo Code


String.prototype.firstToUpperCase = function() {
    return this.substr(0, 1).toUpperCase() + this.substr(1);
};

Related Tutorials