What do you want to save?
Add Code snippet
New code examples
-
-
Javascript 2021-10-10 02:57:03
capitalize algorithm
function capitalize1(str) { const arrOfWords = str.split(" "); const arrOfWordsCased = []; for (let i = 0; i < arrOfWords.length; i++) { const word = arrOfWords[i]; arrOfWordsCased.push(word[0].toUpperCase() + word.slice(1).toL... Add solution -
Javascript 2021-10-09 13:07:06
capitalize a string javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution
Best helpers
Ranking is empty