I have been trying to finish this algorithm. I am probably doing it a very inefficient way, but that’s OK to me because I understand why I am using the code that I am using. What I don’t understand is what I am doing wrong (which is probably a lot, I’m fairly new to this). Can someone tell me what I am doing wrong?

Here is what I have so far:

```
function titleCase(str) {
str.toLowerCase();
var array = str.split(" ");
array[0][0].toUpperCase();
array[1][0].toUpperCase();
array[2][0].toUpperCase();
array[3][0].toUpperCase();
array[4][0].toUpperCase();
if (array[5][0] == true) {
array[5][0].toUpperCase;
}
if (array[6][0] == true) {
array[6][0].toUpperCase;
}
if (array[7][0] == true) {
array[7][0].toUpperCase;
}
var joined = array.join(" ");
return joined;
}
titleCase("I'm a little tea pot");
```