Write a JS function that takes one argument: a sentence (string). This function capitalizes the first letter of each word in the given string and return the result. code example
Example: js capitalize first letter of each word
const titleCase = title => title
.split(/ /g).map(word =>
`${word.substring(0,1).toUpperCase()}${word.substring(1)}`)
.join(" ");