Review JavaScript Fundamentals by Building a Gradebook App - Step 4

You have a lot of extra and wrong quote marks within your both strings

I don’t think that will work but still many person have told me to switcg from while to if else , so

if (getGrade(studentScore)==="F"){

return '"'+'Class average:'+' ' + getAverage(totalScores) +'. ' +'Your grade:' +' ' + getGrade(studentScore)+ '. You failed the course.' + '"';

}else {return '"'+'Class average:' + getAverage(totalScores) +'. ' +'Your grade:' +' ' + getGrade(studentScore)+ '. You passed the course.' + '"';


this isn’t working , same issue as with while loop

Because you have wrong quote marks within your both strings. I didn’t have that quote marks on my keyboard to show you as example.

1 Like

Ah! The above quote marks.

1 Like

you are going back… do not add quotes in the string

ok, add these two lines at the bottom of your editor, and change the body of your function to male them equal, note that to do that you need to remove the quotes from inside the string as first thing

console.log(studentMsg([92, 88, 12, 77, 57, 100, 67, 38, 97, 89], 37))
console.log("Class average: 71.7. Your grade: F. You failed the course.")
1 Like

Take these back out. Seriously. They cannot be there

1 Like

Add space after colons :

1 Like

(") these quotation mark and apostrophe (') works same , have tried this before but its not working.

it doesn’t look like you sre listening to advices

  • quotes are only there to rapresent a string, you should not have quotes as characters of the string. You are never going to pass until you fix this
1 Like

No that is not the matter actually I am new user so I was stopped from commenting for 13 hours , now it is working again.

& I have appended that same code before which you are suggesting , it was not working then . I will try it again and share the the code with you

Mon is not using those curly quotes

note that even where you say “correct quote marks” one of those curly quotes has appeared

1 Like

finally it worked !!!

A lot of thanks to you all guys

1 Like