Tell us what’s happening:
can anyone tell me why I took this track and if I was close to something
Your code so far
function titleCase(str) {
var splt = str.toLowerCase().split(" ");
for (i = 0; i < str.length; i++);
for (j = 0; j < splt.length; j++);
if ( str[i].splt[j] = str[i].splt[0]) {
splt[j] = splt[j].toUpperCase;
}
return splt.join(" ");
}
titleCase("I'm a little tea pot");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
.
Link to the challenge: