6/9 No idea how to solve


#1

var computerChoice = Math.random();

if (computerChoice < 0.34){
	var choice = "rock";
} else if (computerChoice =< 0.67){
	choice = "scissors";
} else {
	choice = "paper";
}

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 if (choice2 === "paper"){
		return "Paper wins";
	}
}

}

console.log(compare("rock","rock");

What is wrong??
ty for fast help


#2

1:

} else if (computerChoice =< 0.67) {

should be:

} else if (computer choice <= 0.67) {

also:

}else if (choice2 === "paper") {
    return "paper wins";
}

should simply be:

} else {
    return "paper wins";
}

You may need to lowercase every letter of your return statements. Sometimes the lesson program is finicky about things like that

finally when you call your function:

console.log(compare("rock","rock");

should be:

compare(userChoice,computerChoice);

or

console.log(compare(userChoice,computerChoice));

though the latter is excessive since your return statements are going to show up in the console anyway.

Hope this helps