From 65b89e8ac013d72d3eff0b56b9acfc395026103a Mon Sep 17 00:00:00 2001 From: Synobbol <97944378+Synobbol@users.noreply.github.com> Date: Tue, 17 Jan 2023 16:40:12 +0100 Subject: [PATCH] Add case-insensitivity --- script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script.js b/script.js index ab3775c..8eff902 100644 --- a/script.js +++ b/script.js @@ -42,6 +42,7 @@ function getComputerChoice(){ function playRound(playerSelection, computerSelection){ let result = "It's a Tie!"; + playerSelection = playerSelection.toLowerCase(); if (playerSelection === "rock" && computerSelection == "paper"){ console.log(playerSelection, computerSelection);