// 1. Get user's choice. // USER: Rock 0; Paper 1; Scissors 2; // COMPUTER: Rock 0; Paper 1; Scissors 2; function getUserChoice(){ const choices = ['rock', 'paper', 'scissors']; const userChoice = Math.floor(Math.random(choices) * 3); console.log(userChoice); } getUserChoice(); // 2. Get computer's choice. function getComputerChoice(){ const choices = ['rock', 'paper', 'scissors']; const computerChoice = Math.floor(Math.random(choices) * 3); console.log(computerChoice); } getComputerChoice();