Extension of rock, paper, scissors


#1
Folks, I decided to extend this game a bit, but I faced with one problem. In majority of the cases when I type "scissors" it gives me an error. The problem lies in result variable, it can't define it and thus outputs undefined for it. Why do you think this is the case? Thanks!
var userChoice = prompt("Do you choose rock, paper or scissors?");

console.log("User: " + userChoice);

var computerChoice = Math.random();
if (computerChoice < 0.34) {
    computerChoice = "rock";
} else if(computerChoice <= 0.67) {
	computerChoice = "paper";
} else {
	computerChoice = "scissors";
} 
console.log("Computer: " + computerChoice);

function compare (choice1, choice2) {
    //if 2 choices are the same - tie!
    if (choice1 == choice2)
        return "The result is a tie!";
        
    //if user's choice is rock
    else if (choice1 === "rock") 
        if (choice2 === "scissors")
            return "rock wins";
        else if (choice2 === "paper")
            return "paper wins";
    
    //if user's choice is paper
    else if (choice1 === "paper")
        if (choice2 === "rock")
            return "paper wins";
        else if (choice2 === "scissors")
            return "scissors wins";
            
    //if user's choice is scissors
    else if (choice1 === "scissors")
        if (choice2 === "rock")
            return "rock wins";
        else if (choice2 === "paper")
            return "scissors wins";
        
}
var result = compare(userChoice, computerChoice);
console.log(result);
if (result[0] === userChoice[0])
    console.log("User wins!");
else if (result[0] === computerChoice[0])
    console.log("Computer wins");
else 
    console.log("Tie!");

#2
if (result[0] === 'T') {
    console.log("Tie!");
}
else if (result[0] === computerChoice[0]) {
    console.log("Computer wins");
}
else { 
    console.log("User wins!");
}

and please read code-convention, especially the IF statement structure
= http://javascript.crockford.com/code.html