== Build "Rock, Paper, Scissors" ==
Tutorial 3#
Instructions
var computerChoice= Math.random();
console.log (computerChoice);
output:
0.92242
Tutorial 3#
Instructions
- Under your previous code, declare a variable called
computerChoice
and make it equal toMath.random()
. - Print out
computerChoice
so you can see howMath.random()
works. This step isn't needed for the game - just useful for learning!
var computerChoice= Math.random();
console.log (computerChoice);
output:
0.92242
No comments:
Post a Comment