Skip to content

String.prototype.ucwords()

Marcel Kloubert edited this page Feb 13, 2015 · 1 revision

String.prototype.ucwords() method

Uppercase the first character of each word in that string.

Syntax

String.prototype.ucwords();

Result

The new string.

Examples

// 'Tm + Mk'
var res = 'TM + MK'.ucwords();
Clone this wiki locally