Friday, 27 June 2014

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

No comments:

Post a Comment