What is wrong with my code, help please

This is my code for the “switch” exercise found in this link https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-22-javascript-syntax-part-i/modules/wdcp-22-learn-javascript-syntax-conditionals/lessons/control-flow/exercises/switch

Can anyone tell me whats wrong?

let athleteFinalPosition = “first place”;

switch (athleteFinalPosition) {
case “first place”:
console.log(“You get the gold medal!”);
case “second place”:
console.log(“You get the silver medal!”);
case “third place”:
console.log(“You get the bronze medal!”);
console.log(“No medal awarded.”);

Why do you think there is anything wrong with your code? What is different from what you expect?

i think my code is fine too.
however i get a red X from the application when i run the code

Maybe because you did not meet the instructions. I can’t see them because I don’t have a PRP account. What are the instructions where you get the the red x?

I get this message

“Did you create a switch statement after the variable athleteFinalPosition ?”

Ok, that’s what you did. The validation is sometimes tricky: Maybe there is an error from a former instruction which has passed before while it shouldn’t have. Or it is simply a space more or less.

found it
it was the double ticks " - it need single ’
thank you for your efforts

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.