== 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
computerChoiceand make it equal toMath.random(). - Print out
computerChoiceso 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