I don’t understand why the default switch statement is running even though the score is between 70 and 90
actual task : https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Test_your_skills:_Conditionals //Conditionals 3 Task.
My code: https://codeshare.io/wnzjOR
The problem is your switch expression. You’re using response
that is undefined
. You need to write switch (true)
. So whenever a certain case
is also true its code will be executed.
Also you need to remove the parentheses in the first case
clause.
See you,
Michael
1 Like