.55 in rock paper scissor


I was doing Rock paper and Scissor, and it worked perfectly but i decided to randomly do it again.Then **when .55 appears, result is shown as .55, not ‘paper’.THOUGH I CAN MOVE TO NEXT CHAPTER.I WON’T.**So i made some changes to it so that i know its .55 enerytime…pls.help me.

var userChoice = prompt(“Do you choose rock, paper or scissors?”);

var computerChoice = .55;
if (computerChoice < 0.33 ) {
computerChoice = “rock”;
else if(computerChoice <= 0.66) {
computerchoice = “paper”;
else {
computerChoice = “scissor”;


First of all you should use Math.random() instead of guessing a random number :slight_smile:
Or did you choose one to see if it is working?
For the actual problem I’d guess it’s that you use both computer c hoice and computer C hoice and therefore you ask for the value of different variables.


You are assigning “paper” to a different name


Yup.I was checking.And thanks bro.C was the anti hero. :smile:


yes.Thanks bro. C is the reason