Tell us what’s happening:
Return the same but but still said error.
Your code so far
function titleCase(str) {
var some = str.split(' ');
/*var all =some[1].charAt(0);
all = all.toUpperCase();
*/
var all=[];
var aqui='';
for(var i= 0; i < some.length; i++){
some[i] = some[i].toLowerCase();
all = some[i].replace(some[i][0],some[i][0].toUpperCase());
aqui += all + " ";
}
return aqui ;
}
titleCase("I'm a little tea pot");
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/title-case-a-sentence