Skip to content

Instantly share code, notes, and snippets.

@slaght
Created June 30, 2023 17:21
Show Gist options
  • Save slaght/1c978a474ae41e5a2aba9ba279d7b9d1 to your computer and use it in GitHub Desktop.
Save slaght/1c978a474ae41e5a2aba9ba279d7b9d1 to your computer and use it in GitHub Desktop.
String building method
function logResult(winningMove, losingMove, computerWins) {
console.log(winningMove + " beats " + losingMove + "! You " + (computerWins ? "lose" : "win") + "! \n Player: " + playerScore + " \n Computer: " + computerScore);
}
logResult(playerSelection, computerSelection, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment