Tell us what’s happening:
It is saying that str[i].join is not a function?
What is the deal?
Your code so far
function titleCase(str) {
str.toLowerCase();
str.split(" ");
for(var i=0; i<str.length; i++) {
str[i].split("");
str[i][0].toUpperCase();
str[i].join("");
str.join(" ");
}
return str;
}
titleCase("I'm a little tea pot");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 OPR/50.0.2762.67
.
Link to the challenge:
https://www.freecodecamp.org/challenges/title-case-a-sentence