Hey guys, I was having trouble with this task, so came here for help. seeing this brought up another question of why is the -1 required in names[names.length-1].
and tested and see that it does work, but why cant you just set names.length??
Remember that arrays are initiated from zero i.e
index0 - Chris;
index1 - Li Kang;
index2 - Anne;
index3 - Francesca;
index4 - Mustafa;
index5 - Tina;
index6 - Bert;
index7 - Jada
The index of the last character in the array equals 7. This means that the length of the array is always 1 more than the last character of the array. So, if I typed console.log(names[names.length])//undefined because there is no 8th character in the array. If I typed console.log(names[names.length -1])//Jada
it would return the last character.