What is wrong here!


#1

var compare = function (choice1,choic2){
if (choice1 === choice2)
{return 'the resulti is tie';}

else if (choice1 === 'rock'){

    if (choice2 === 'scissors')
    {
        return "rock wins";}

    else (choice2 === "paper"){
        return "paper wins";
        }
}

}

#2

you at least miss an e in choice2.


#3

your problem is you don't writte choic2 correct for this reason you have this problem the correct form is var compare =

function (choice1,choice2) tis is the correct form men


#4

if you have sublime text you can writte you code there and is correct .in my case i have a blackboard in my room and when i have some problem i written my code first and after in the pc.


#5

thanks all
MY BAD
I am so careless


#6

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