function studentMsg(totalScores, studentScore) {
let pF = “”;
if (hasPassingGrade(studentScore)) {
pF = "You passed the course."
} else {
pF = "You failed the course."
}
return "Class average:" + getAverage(totalScores) + ". Your grade:" + getGrade(studentScore) + "." + pF;
}
console.log(studentMsg([92, 88, 12, 77, 57, 100, 67, 38, 97, 89], 37));
/* console.log(studentMsg([56, 23, 89, 42, 75, 11, 68, 34, 91, 19], 100)); */
Class average:71.7. Your grade:F.You failed the course.
Sorry, your code does not pass. Hang in there.
Your function call of studentMsg([92, 88, 12, 77, 57, 100, 67, 38, 97, 89], 37)
should return the following message: "Class average: 71.7. Your grade: F. You failed the course."
.