charAt is a function that operates on a String. while split is a String operation which returned an Array.
Using a String function on an Array would not work.
Hope this helps.
you might want to iterates through the Array that you created with split.
str // str comes with "I'm a little tea pot"
var splittedString = str.split(" ") // this will split the str into splitted String
splittedString // content is ["I'm", "a", "little", "tea", "pot"]
since splittedString is an Array now… you would need to uppercase every element of it.
You are right … you are almost there… just need to perform the toUpperCase function inside a loop.