What did I do wrong?



Every time I submit the code this ferro message pops up, please tell me why
"Oops, try again. Did you set var computerChoice = Math.random() ? The capital 'M' in 'Math' is important!"

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(choice1, choice2){
if (choice1 === choice2){
return "The result is a tie!";
else if (choice1 === "rock"){
if (choice2 === "scissors"){
    return "rock wins";
    else {
        return "paper wins";


It doesn't look like anything's wrong. I ran it outside of codecademy and it worked just fine. Probably just a bug in the lesson.


This is code from the next exercises. And this is the problem.

Follow instructions, it doesn't make sense to use code written by others.


This how my teacher told me to do it


In this exercise you only need two first lines of your code.