A small mistake before the end of the exercise :(


#1

Does anyone know why I get two more lines?

undefined

rock wins


#2

HI in your compare function chnage all the console.log() with the return statement


#3

Thank you, you helped me a lot :slight_smile:


#4

Hello everyone,
I might be a bit late for this one. But I am stuck at Computer choice part .
This message keeps popping up "Oops, try again. Did you remember to log computerChoice to the console?".
Its the most annoying thing. I have been going at it for hours. Even tried walking away from it and came back same thing. I feel really silly. But I think I am flowing the instructions to the T.

What am I missing?

This below is my code

var userChoice=prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
Math.random();

And it is printing out a random number every time. but I cannot get passed it.


#5

HI this line

Math.random();

change it to

console.log(computerChoice);

because the error says that you should log the computerChoice


#6

Thank you. @wizmarco
I Changed it. but now I get
TypeError: console.log is not a function


#7

can you post your new code?


#8

var userChoice=prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
console.log(computerChoice);


#9

try to refresh the page because your code is right..


#10

Thank you.
I refreshed and voila like magic. I have a headache.


#11

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