Can someone help me to see what I am not seeing here please:
function titleCase(str) {
let myRegex = /\S+/gi;
let myArray = str.match(myRegex);
console.log(myArray); //[ 'I\'m', 'a', 'little', 'tea', 'pot' ]
for (let i=0; i<myArray.length; i++){
myArray[i].charAt(0).toUpperCase();
}
console.log(myArray); //doesn't capitalize the start letter of every array's strings, why?
}
titleCase("I'm a little tea pot");