Alex's Number Guesser

This is my code for the number guesser project in Javascript syntax 1. It took an annoyingly long time to figure out the logic for the comparison (annoying because I felt like the solution was staring me straight in the face) but I think I figured it out. After quite a bit of testing it seems to work, but if you notice anything odd feel free to give me some feedback.

let humanScore = 0; let computerScore = 0; let currentRoundNumber = 1; // Write your code below: const generateTarget = () => { return Math.floor(Math.random() * 10); } const compareGuesses = (human, computer, target) => { target = Math.abs(target); human = Math.abs(human - target); computer = Math.abs(computer - target); //console.log(target); //console.log(human); //console.log(computer); if (computer < human) { return false; } else { return true; } } const updateScore = (string) => { if (string === 'human'){ humanScore++; } else { computerScore++; } } const advanceRound = () => { currentRoundNumber++; }