Add case-insensitivity
This commit is contained in:
parent
97544cafe5
commit
65b89e8ac0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user