5. both choices are the same


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-Bthev-mskY8/1/1?curriculum_id=506324b3a7dffd00020bf661#

it keeps saying my compare function does not return, I litteraly typed everything over from the hint screenshot


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";   
    }
};


#2

Hi inside your return statement you wrote

return "the result is a tie";

Instead of

return "The result is a tie!";

#3

@boardslayer59919

Put the above code in comments.
Hint:
A comment is defined by putting a /This is a comment/ or */This is a comment*/


#4

i'm done with this course.
I'm sick of having these little things that shouldn't matter keep giving me faults


#5

A post was split to a new topic: 5. Your compare function does not return 'The result is a tie!'