How is an unrecoverable syntax error fixed?

what do you put there?

You have two lines of code that are just

"";

That’s not valid.

What will happen if John is typed?

Try it.

why does “ate nine” come up?

With your new code, it doesn’t.

  1. Count your opening and closing curly braces again. Do they match up? Are they in the right places?
  2. The lines ""; will cause a syntax error when you test "John" and 156.

I removed those “” spots, I actually passed the challenge. Does John act like another “if-else” statement actually?

I’m making assumptions about your currently code - including that you simply removed the last two case blocks of your switch statement.

It’s more like an if without an else. Because none of your case conditions were met, the variable answer was not changed. Because you initialized it to an empty string at the start of your function, it remains an empty string.

1 Like

Not trying to change the subject but what IDE are you using ?.