Hi everyone, my name is Jeanine and this is my second time giving this project a go. I tried editing my compareGuesses f(x) as I thought that might be the issue…however the code is still not working and I’ve even pasted it into Visual Studio Code to see if it might be a syntax error. Here’s my code below, any feedback would be much appreciated - thanks!

```
let humanScore = 0;
let computerScore = 0;
let currentRoundNumber = 1;
// Write your code below:
const generateTarget = () => {
return Math.floor(Math.random() * (10)
}
//this function will be called each round to determine which guess is closest to the target number and determine a winner
const compareGuesses = (humanGuess, computerGuess, targetGuess) => {
var humanDifference = Math.abs(targetGuess - humanGuess);
var computerDifference = Math.abs(targetGuess - computerGuess);
if (humanDifference < computerDifference) {
return "You won!";
} else if (humanDifference > computerDifference) {
return "The computer won";
} else {
return "You won!";
}
}
//this function will be used to correctly increase the winner's score after each round
const updateScore = winner => {
if (winner ==='human') {
humanScore++;
} else if (winner === 'computer') {
computerScore++
}
};
//this function will be used to update the round number after each round
const advanceRound = () => currentRoundNumber++;
```