Rock,Paper,Scissor Game Help


#1

I know the code is incomplete bu could some please tell me why my opponent keeps choosing rock.


#2

because you use the assignment operator = instead of the comparison operators == or ===.


#3

Sam,
I have no idea but am really impressed by how you set your logic up. Never would have thought of it.


#4

where did I go wrong ??

var winning = function (firstPlayerMove , secondPlayerMove ) {
var firstPlayerMove = prompt "Please enter your move"
var secondPlayerMove = prompt "Please enter your opponent's move"
if winning ("Paper" , "Scissors")
console.log "scissors wins"
else
if winning ("Paper" , "Rock")
console.log "Rock wins"
else
console.log ("Paper wins");
}