3. Logging computerChoice to console


#1

I recently went through this whole lesson but I'm going back through it again to refresh my memory since it's been a few weeks. I'm weirdly stuck on logging the computerChoice to the console?

The code below produces the correct answer, it logs the number to the console and I can see it, but Code Academy is telling me I haven't logged it.

"Oops, try again. Did you remember to log computerChoice to the console?"

What clearly obvious thing am I missing?

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

var computerChoice = Math.random();

console.log = (computerChoice);

#2

remember the syntax for console.log();
You shouldn't have =


#3

But when I remove the = I get "TypeError: console.log is not a function"

console.log(computerChoice);


#4

HI now just refresh the page...


#5

Oh!! Jeez. How come that happened?


#7

Okay, that's what I thought it was, which explains my confusion. Thanks :slight_smile: