Whats wrong i dont get it plzz help


#1

code:

var user=prompt("What sport you like").toLowerCase();
var user2=prompt("What is your favorite player?").toLowerCase();

var
switch(user){

case'i like soccer':
if(user==="i like soccer"&& user2==="cristiano ronaldo"){
console.log("Thats nice soccer is the best sport you know! Ronaldo is the best player too respect for you!") }

    else if(user==="i like soccer"||user2==="lionel messi ") {
        console.log("Yeha nice to meet you")
        }


        else{
            console.log("k whatever") }



    break;


    case'i like hockey':
        console.log("Thats awesome your good at skating and pace than like me!")
        break;


        case'i like volleyball':
            console.log("That is cool thoguh so you have handles")
            break;


            default:
            console.log("Thats great, awesome")
            break;

#2

I think you'll find it easier to get a reply if you describe what you expect to happen and what is happening differently from that.


#3

like what help me plzzzzzzzzzzzzzzzzzzzz


#4

For us to be able to help you, you have to tell us what YOU think the error is, or at least what it said you were doing wrong, whether that be a syntax error or an undefined identifier. I find that it helps a lot to open up the example lesson and have both windows open, so that I can see what they did and what I did side by side. But, again, in order for us to help, you HAVE to give us specifics!


#5

nvm guys i found it i added a var right before switch