so this is my JavaScript number Guesser code so far. I’m trying to link in the computer guess function and the general target functions below, but it doesn’t work. Any suggestions?

let humanScore = 0;

let computerScore = 0;

let currentRoundNumber = 1;

const generateTarget = () => {

Math.floor(Math.random()*10)

};

const computerGuess = () => Math.floor(Math.random()*10)

// Write your code below:

function compareGuesses(computerGuess, humanGuess, targetNumber) {

let computerGuess = computerGuess();

let targetNumber = generateTarget();

if (Math.abs(computerGuess-targetNumber) === Math.abs(humanGuess-targetNumber)){

return true

}else if (Math.abs(computerGuess-targetNumber) < Math.abs(humanGuess-targetNumber)){

return false

}else if (Math.abs(humanGuess-targetNumber) < Math.abs(computerGuess-targetNumber)){

return true

}else{

return ‘Error’

}