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 "papers wins"; } else if(choice1 ==


#1

what am i doing weong

edit by haxor789:

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 "papers wins";
            } else if (choice1 ==

#2

You have to post your complete code. Posting only a part of your code in the headline won't allow anyone to give you proper help.

I also suggest to use http://jsbeautifier.org/ to format you code if you did'nt already do that by hand. When you code is formatted properly, make sure to press ctrl+shift+c then paste your code (alternatively you paste the code, then select the whole code and press ctrl+shift+c).


#3

Please copy your code