I feel like this should work but it just returns all lower case. Any suggestions?

Tell us what’s happening:

Your code so far

function titleCase(str) {
  
  strLower = str.toLowerCase();
  strArray = strLower.split (" ");
  for (i = 0; i < strArray.length; i++){
    strArray[i][0].toUpperCase();
    
  }
  return strArray.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; rv:59.0) Gecko/20100101 Firefox/59.0.

Link to the challenge:
https://www.freecodecamp.org/challenges/title-case-a-sentence

String functions like toUpperCase - return a new string - they do not modify the existing string.
It is important to recall that strings are immutable in javascript.
You need to assign the return of the function toUpperCase to a variable or it is lost.