Step 9: Got stuck and cant continue in this step. Am I doing the right thing really? Somebody assist pleaseex

project
game

#1

https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/1/5?curriculum_id=506324b3a7dffd00020bf661


var varName = "userChoice"
var computerChoice = Math.random()
if (computerChoice <= 0.25){
computerChoice ="rope";
}
else {
computerChoice ="dog";

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

Kindly tell me where I am going wrong, thanks


#2

It depends on what you are trying to do with this code. It seems like you want to add rope and dog as choices to the rock, paper, scissors game. Is that right?


#4

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