Capitalize String - Node.js String

Node.js examples for String:Case

Description

Capitalize String

Demo Code

String.prototype.capitalize = function() {
    if (this[0]) return this[0].toUpperCase() + this.slice(1);
};

Related Tutorials