Add case-insensitivity

This commit is contained in:
Synobbol 2023-01-17 16:40:12 +01:00
parent 97544cafe5
commit 65b89e8ac0

View File

@ -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);