5 Logical Operators - if condition


5 - Logical Operators

It's saying my if statement needs to start with ( but as far as I can see it does. Any ideas?

SyntaxError: Unexpected identifier 'console'. Expected '(' to start an 'if' condition.

var user = prompt("Favourite Metal Genre").toLowerCase();

switch(user) {
   case 'black': 
   var which = prompt("atmospheric" || "finnish");
       if(which === 'atmospheric') {
           console.log("Me too!");
       } else {
           console.log("I also like Finish Black Metal.");
   case 'death':
       console.log("Decent choice.");
case 'pagan':
      console.log("That's not metal...");


Can you link the exercise? It might be an issue with your code disagreeing with the instructions.


Hey, I ended up just erasing it all and starting from scratch and it was fine. Not sure what the original problem was but...


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