Build a Gradebook App - Build a Gradebook App

Tell us what’s happening:

Hey there, i cant seem to get 19. "Your hasPassingGrade function should return false if the grade is an “F”.
Everything else has passed and I’ve been trying to figure out things i could try to get this to work.

Your code so far

function getAverage(arr) {
  let sum = 0;
  let average = 0;
  for(let i = 0; i < arr.length; i++){
    sum += arr[i];
    if(i === arr.length - 1) {
      average = sum / arr.length;
    }
  } return average;
}
function getGrade(score){
if (score === 100) {return "A+"}
else if (score >= 90) {return "A"}
else if (score >= 80) {return "B"}
else if (score >=70 ) {return "C"}
else if (score >= 60) {return "D"}
else {return "F"}
}
function hasPassingGrade (grade) {
  if (grade === "F"){
    return false} 
  else if (grade !== "F"){
    return true}
}
function studentMsg (arr, score) {
  if(hasPassingGrade(getGrade(score)) === true){
return `Class average: ${getAverage(arr)}. Your grade: ${getGrade(score)}. You passed the course.`
}
else if (hasPassingGrade(getGrade(score)) === false){
return `Class average: ${getAverage(arr)}. Your grade: ${getGrade(score)}. You failed the course.`
  }
}
console.log(studentMsg([15, 25, 35, 45, 55, 60, 70, 60], 69))

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0

Challenge Information:

Build a Gradebook App - Build a Gradebook App
https://www.freecodecamp.org/learn/full-stack-developer/lab-gradebook-app/build-a-gradebook-app

you should read again the user stories about hasPassingGrade, which is 3 and 4

Note - this is a very nonstandard style and I recommend against it.

ahh thank you, i had to read it like 6 more times till i saw it