const average = getAverage(totalScores);
const grade = getAverage(studentScore);
if (grade !== "F"){
return ("Class average:" + average + "Your grade:"+ grade + "You passed the course.")
}
else {
return ("Class average:" + average + "Your grade:"+ grade + "You failed the course.")
}
}```
My error: TypeError: Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
You have using same function getAverage() for both your average and grade variable. You need the function getGrade() for for passing student score.
Also you need to remove extra () parentheses around your both returning strings, And correct the spacing and punctuation within your both strings.
Class average: 71.7. Your grade: F. You failed the course.
hey @Assasinsk please try to solve it yourself , this is a review project, if you can’t solve it yourself you should not go forward. Have you opened your own topic?