Having Trouble with Title Case a Sentence

I have been working on this for hours.
Here is my Code my log shows that everything is right but it’s not passing any clues as to why?

You’ve got an extra space at the end of the string.

"The trim() method does not change the original string."
Source: http://www.w3schools.com/jsref/jsref_trim_string.asp

1 Like

Quickz thank you I got it by changing
upperCase.trim(); to upperCase = upperCase.trim()