Computer choice part 1


#1

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

still don't get through


#2

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


#3

I think putting a semicolon after your first line will make it work, as below:

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

You showed me the console.log section to output it, so thanks for that!


#4

This isn't working for me. I'm not sure what's wrong with it.

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


#5

The error I get is "TypeError: console.log is not a function"


#6

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


#7

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