Console.log not a function!?


#1

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

I don't know how this isn't working. It keeps saying console.log is not a function


#2

This often happens when you have used console.log = (...) instead of console.log(...) as this assigns a new value to console.log and which therefore makes it no longer be a function. Just refreshing the page should solve the problem if there is no other error and as far as i can see the code is fine.


#3

I think that's what happened. Thank you!


#4

thank you, I had this same problem! :smiley: