-
-
Save codecademydev/3c36be34e25eed4e9aa1d12c76fc2cdb to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let humanScore = 0; | |
let computerScore = 0; | |
let currentRoundNumber = 1; | |
const generateTarget= () => { | |
return Math.floor(Math.random()*10); | |
}; | |
const compareGuesses = (human, computer, numberGuess) => { | |
if(human === true){ | |
return 'The human player win.'; | |
}else{ | |
return 'The computer player win.'; | |
}; | |
}; | |
const updateScore = Winner => { | |
if(human === winner) { | |
human++; | |
}else { | |
computer++; | |
}; | |
}; | |
const advanceRound= () => { | |
currentRoundNumber++; | |
}; | |
// Write your code below: | |
compareGuesses(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment