Menu
Coddy logo textTech

9. Case a Sentence

Lesson 10 of 31 in Coddy's 30 Days of Logic Building in Javascript course.

challenge icon

Challenge

Easy

Write a function that converts the first letter of each word in a sentence to uppercase.

  • Input: <strong>"this is a title"</strong>
  • Output: <strong>"This Is A Title"</strong>

Try it yourself

function titleCase(sentence) {
    // write your code below   
}

All lessons in 30 Days of Logic Building in Javascript