Please help me with the "ReferenceError: $ is not defined" and even if result is right I couldn't able to move to next session


#1

The following is my code

var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
	computerChoice = "rock";
} else if(computerChoice <= 0.67) {
	computerChoice = "paper";
} else {
	computerChoice = "scissors";
} 
console.log("Computer: " + computerChoice);

var compare = function(userChoice, computerChoice) {
    if(userChoice === computerChoice) {
        return"The result is a tie";
    }
    else {
         return"The result is a different";
    }
};
console.log(compare(userChoice, computerChoice));

#2

I can't find a $ sign in your code maybe refresh the page. And add a ! to the end of your tie message.


#3

Thanks, its worked and sorted.