Getting SyntaxError: Expected ';' error


I'm getting a message about a missing ';'. I don't think it's right, but I added one after the If statement. That cleared up that error, but then I get SyntaxError: Syntax error. Again, I don't think a semicolon belongs there, but I don't see where I'm missing one. Maybe another set of eyes will find my mistake.

var user = prompt("What is your favorite band?").toUpperCase();

switch(user) {
      console.log("You obviously have good taste.");
  var drummer = prompt("Which drummer is better?").toUpperCase(); 
        If(drummer === "PEART") {
            console.log("Of course, the Professor");
        else {
            console.log("John was good, but seriously?");
      console.log("A fine choice, your parents would be proud.");
  case("ONE DIRECTION"):
      console.log("You are a shame to your entire family.");
      console.log("Try again.");


Hi this line

If(drummer === "PEART")

you wrote If instead of if should be with downcase i


Wow, thanks. Something so simple...
That was it, works perfectly now.
Thanks again!


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