For the second part of your question you can use reduce to good effect here:
const grades = [80, 77, 88, 95, 68];
function getAvg(grades) {
const total = grades.reduce((acc, c) => acc + c, 0);
return total / grades.length;
}
const average = getAvg(grades);
console.log(average);
The other answers have given good insight into why you got 68, so I won't repeat it here.