Here is the code snippet:
var i = prompt('Please choose Rock, Paper or Scissors:');
var b = ['Rock', 'Paper', 'Scissors'];
Now, I need help in generating a random number between 0-2. My initial idea was to do this:
var i = prompt('Please choose Rock, Paper or Scissors:');
var b = ['Rock', 'Paper', 'Scissors'];
document.write(Math.random(0, 2));
var c = //the part that's unclear to me
document.write(b[c]);
Any suggestions or feedback?