Skip to content

Instantly share code, notes, and snippets.

View SinachPat's full-sized avatar
🎯
Focusing

Osinachi Patrick SinachPat

🎯
Focusing
View GitHub Profile
let choices = ["Rock", "Paper", "Scissors"];
function computerPlay(choices) {
let option = choices[Math.floor(Math.random()*choices.length)];
return option;
}
// computerPlay(choices);
function oneRound(playerSelection, computerSelection) {
if (playerSelection == "rock" && computerSelection == "rock") {
console.log("It's a tie! rock holds rock");