Skip to main content
Sign in
Snippets Groups Projects
Commit 8bc199e7 authored by Subliminal Guy's avatar Subliminal Guy
Browse files

Bug Fix Arrow Function

parent 2f01457e
Branches feature/buttons
No related tags found
No related merge requests found
......@@ -9,9 +9,9 @@ const roundResultsMessage = document.getElementById("results-msg")
const buttonStein = document.getElementById("rock-btn")
const buttonPapier = document.getElementById("paper-btn")
const buttonSchere = document.getElementById("scissors-btn")
buttonStein.addEventListener("click", showResults("Stein"));
buttonPapier.addEventListener("click", showResults("Papier"));
buttonSchere.addEventListener("click", showResults("Schere"));
buttonStein.addEventListener("click", () => showResults("Stein"));
buttonPapier.addEventListener("click", () => showResults("Papier"));
buttonSchere.addEventListener("click", () => showResults("Schere"));
function getRandomComputerResult(){
......@@ -43,6 +43,7 @@ function getRoundResults(playerChoice){
}
function showResults(playerChoice) {
console.log("click")
roundResultsMessage.innerText = getRoundResults(playerChoice)
playerScoreElement.innerText = playerScore;
computerScoreElement.innerText = computerScore;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment