8/9 - Rock, Paper, Scissors - please, help! What I'm doing wrong?!


#1

I don't understand, what's wrong with my code, please help with this.

When I pressed "Save and Submit code", I have gotten this message:"Oops, try again. You seem to have something wrong with your code. It threw the following error: ReferenceError: userChoise is not defined".
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(choise1, choise2) {
if (choise1 === choise2) {
return "The result is a tie!";
} else if (choise1 === "rock") {
if (choise2 === "scissors") {
return "rock wins";
} else {
return "paper wins";
};
} else if (choise1 === "paper") {
if (choise2 === "rock") {
return "paper wins";
} else {
return "scissors wins";
};
} else if (choise1 === "scissors") {
if (choise2 === "rock") {
return "rock wins";
} else {
return "scissors win";
};
};
};
compare(userChoise, computerChoise);


#2

it's choice not *choise