Grade lesson bug

Hi, the result in the console is good, I think I wrote the code correctly, when I want to go further it tells me that the result should be the same, what can I do?

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";

}

}

console.log(getGrade(96));

console.log(getGrade(82));

console.log(getGrade(56));

CONSOLE “RESPONSE” IS A, B, F

score should be less than or equal to passing marks, not more than to mate the condition.

If you look at the grades table, you can see it is an inclusive range. So it should include both numbers in the range.

Score Range Grade
100 "A++"
90 - 99 "A"
80 - 89 "B"
70 - 79 "C"
60 - 69 "D"
0 - 59 "F"

But I realize the hint is ambiguous because of the use of the word “between”.

Your getGrade function should return "B" if the score is between 80 and 89.


Just for future reference:

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Thank you very much guys!
Next time i will use the Help button!