I\'m learning javascript and I decided to create simple Rock, Paper, Scissors game. I want to make it controllable by buttons. So I made this in html:
Seems like a scoping issue. Try removing the var inside the function.