Quantcast
Channel: freeCodeCamp Challenge Guide: Title Case a Sentence
Viewing all articles
Browse latest Browse all 50

freeCodeCamp Challenge Guide: Title Case a Sentence

$
0
0
function titleCase(str) {
  return str.toLowerCase()
         .split(' ')
         .map(word => word[0].toUpperCase() + word.slice(1, word.length))
         .join(' ');
}

Read full topic


Viewing all articles
Browse latest Browse all 50