String.prototype.toUpperCaseAll = function () {
return this.split(" ").map( w => w.charAt(0).toUpperCase() + w.substr(1, w.length-1)).join(" ");
};
Last active
October 10, 2018 17:12
-
-
Save andrit/a5b699aa99315ad822729bd6b767e055 to your computer and use it in GitHub Desktop.
uppercase every word in a string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment