my code is:
function studentMsg(totalScores, studentScore){
if(hasPassingGrade(studentScore)){
return ("Class average:" + getAverage(totalScores) +".Your grade:"+getGrade(studentScore) + ".You passed the course.")
} else {
return ("Class average:" + getAverage(totalScores) +".Your grade:"+getGrade(studentScore) + ".You failed the course.")
}
}
console.log(studentMsg([92, 88, 12, 77, 57, 100, 67, 38, 97, 89], 37));
getting error:
Sorry, your code does not pass. Don’t give up.
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."
.