9. Next Steps rock /paper/scissors


#1

Hi,
I finished next steppes of the rock paper scissors with the code below and I get a pass on the lesson.
But on the console only prints the first part, where the console.log prints"Computer: " + computerChoice

I added "console.log("the result is tie");" after the first return in, and even though it was a tie I still only got the first part.
How do i get to print if it is a "tie" in the console log? i did the same and got the same in JS editor on my pc.

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


#2

@leftthumb

Remember to put curly brackets.