setText("gradeOutput", getText("gradeOutput") + gradeList[(gradeList.length - 1)]);
Unfortunately, that won’t work. You are set up to add grades, but not remove them. What I recommended over a year ago was this.
setText("gradeOutput", gradeList);
Since then it has started to be flagged with a warning. You could use the toString() method of an array to reassure the lint program it is what you intended, but we don’t cover that in CS Principles. You could ignore the warning. It works. That seems like a bad thing to teach.
So now you must use a loop. I would recommend creating a new function like this.
function setTextFromArray (id, values) {
var text = "";
if (values.length > 0) {
text = text + values[0];
if (values.length > 1) {
for(var i = 1; i < values.length; ++i) {
text = text + ", " + values[i];
}
}
}
setText(id, text);
}
Teaching them to extend the existing abstraction is a good thing. And the function is based on the list reduce pattern here Code.org. Though I prefer a modified pattern as given here Everything You Wanted to Know About App Lab Arrays, But Were Afraid to Ask.