Build "Rock Papper Scissors" Complete but incomplete?.?.?


#1


Build "Rock, Paper, Scissors" 9/9


even while the outcomes (returns) are diffrent, it still spits out "the result is a tie!".... what am i doing wrong ??

at first i didn't even had the "Console.log(compare())" on line 33 because it didn't spit out the answer (wich one wins)
but after i did some keyboard tapping it appeared and seemed to work
...... help .... :see_no_evil:



#2

on line 33 you call your function, but you don't supply any arguments?


#3

i tried to call "Console.log(compare(choice1,choice2)) but that spits out "ReferenceError: choice1 is not defined"


#4

but choice1 and choice2 are your function parameters, they only exist inside the function.

Which variables (outside your function) hold the choice of the user and the choice of the computer?


#5

userChoice and computerChoice :see_no_evil: i see what i did wrong there...
console.log(compare(userChoice, computerChoice) :smiley:

but still, if i leave the Console.log on line 33 out, it will still complete the challenge even though it didn't do what the challenge expects you to do, right ??


#6

just leave out the console.log or also the function call? If you leave the function call out you should get an error message:


#7

If you mean the function userChoice and computerChoice ?? i just get this when i take them away on line 33 (see screenshot)
even if i do console.log(compare()) or completely delete line 33, i still pass the challenge


#8

Very likely your browser send cached data, not very important.

I recommend to just progress


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.