Hello everyone I am doing the number guesser project and I am not understanding why my code won’t work properly. I have looked on the forums and have found answers but I am determined to make it my own. Would anyone have any advice?
let humanScore = 0;
let computerScore = 0;
let currentRoundNumber = 1;
const generateTarget = () => {
return Math.floor(Math.random()*10);
};
const compareGuesses = (humanScore, computerScore, numberGuess) => {
if (humanScore === numberGuess ) {
return 'Human Wins!';
}else if
(computerScore === numberGuess ) {
return "Computer Wins!"
} else {
return 'It is a tie!'
}
}
const updateScore = (humanScore) => {
if(humanScore === winner) {
human++;
}else {
computer ++
};
};
function advancedRound() {
currentRoundNumber++;
}
compareGuesses();