Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion game.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
// Write all your code here
// Replace the contents of this file with your own code
console.log('Hello, world!');
var array1 = ['Paper', 'Scissors', 'Rock']

function computerPlay() {
const index = Math.floor(Math.random()*array1.length);
return index;
}

console.log(computerPlay());
let result = computerPlay();
console.log(result)

function playRound(playerSelection, computerSelection) {
// your code here!
}

const playerSelection = 'rock'
const computerSelection = computerPlay()
console.log(playRound(playerSelection, computerSelection))

function game() {

}