Build "rock, Paper, Scissors" 9


#1



`

it actually gave me this


#2

@kayjohnny
and what happens when you call the compare() function
without using a console.log().....???


#3

it only outputs the computer result


#4

@kayjohnny,
I would put an extra console.log( userChoice ); just under the computerChoice-display
and
could you give the FULL code you are using.....


#6

if any need a help hope following code works

var compare=function(choice1,choice2){
if(choice1 === choice2) {
return "The result is a tie";
}

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

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

}
}
console.log(compare(userChoice,computerChoice));