I currently have a 2D array filled with student profiles. In the first column, we have First Names, in the second Middle Names, and in the third Last Names, continuing on to other columns.
My objective is to merge the text from all three columns, convert it into uppercase, and then insert it back into Column 1 as "FIRSTMIDDLELAST" in cell A1.
The code snippet I've provided below seems quite straightforward but since I'm fairly new to JS, I encounter an error when trying to execute it...
Cannot read property "0" from undefined.
@ line
StudentList[i][0].concat(FistName,MidlName,LastName);
for (var i=0; i<StudentList.length; i++){
var FistName = StudentList[i][0].valueOf().toUpperCase();
var MidlName = StudentList[i][0].valueOf().toUpperCase();
var LastName = StudentList[i][0].valueOf().toUpperCase();
StudentList[i][0].concat(FistName,MidlName,LastName);
}
Any assistance would be highly appreciated. Thank you so much in advance.
UPDATE:
This excerpt provides a glimpse of the Google Spreadsheet where my array originated ....
First Middle Last Age Grade English Maths
John Peter Smith 17 12 A A
Kevin Paul James 16 11 B C
Kim Caroline Anderson 15 10 B A
.... and so forth