Tell us what’s happening:
Hello coders !
I’m getting the following output after I ran the code
Your code so far
function titleCase(str) {
var lowerCased= str.toLowerCase();
splitted = lowerCased.split(' ');
var camelCased = "\"";
for(var i = 0; i< splitted.length; i++){
camelCased += splitted[i][0].toUpperCase();
for(var j = 0; j < splitted[i].length-1;j++){
camelCased += splitted[i][j+1];
}
if(i<splitted.length-1){
camelCased += " ";
}
}
return camelCased+"\"";
}
titleCase("sHoRt AnD sToUt");```
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/title-case-a-sentence