What is wrong here!


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";



you at least miss an e in choice2.


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


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.


thanks all
I am so careless


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