Build a Gradebook App - Build a Gradebook App

Tell us what’s happening:

I’ve already shown it exactly as required. Why is there still an error

Your code so far

   function getAverage(arr){
      const sum = arr.reduce((a,b)=>a+b,0);
      return sum / arr.length;
    }
    function getGrade(grade){
      if(grade == 100){
        return 'A+';
      }else if(grade >= 90 && grade < 100){
        return 'A';
      }else if(grade >= 80 && grade < 90){
        return 'B';
      }else if(grade >= 70 && grade < 80){
        return 'C';
      } else if(grade >= 60 && grade < 70){
        return 'D';
      }else{
        return 'F';
      }
    }
    function hasPassingGrade(grade){
      if(grade == 'A'){
        return true;
      }
      if(grade == 'F'){
        return false;
      }else{
        return true;
      }
    }

    function studentMsg(arr,grade){
      return `Class average: ${getAverage(arr)}. Your grade: ${getGrade(grade)}. You ${hasPassingGrade(getGrade(grade)) ? 'passed': 'failed'} the course.`;
    }

    console.log(hasPassingGrade("F"))
    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))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36

Challenge Information:

Build a Gradebook App - Build a Gradebook App

Take another look at the requirements of the hasPassingGrade function.

The second issue might sound a bit strange. The second colon in the returned string is not a normal colon : (ascii value 58), but a fullwidth colon (ascii value 65306).