Number Guesser project

Hi can anyone explain me why Round number and scores increment by 2 after i click next round ? it jumps from round 1 to 3 after that it works fine, the same with points

let humanScore = 0;

let computerScore = 0;

let currentRoundNumber = 1;

// Write your code below:

const generateTarget = () => {

let randomInt = Math.floor(Math.random() * 10);

return randomInt;

};

const compareGuesses = (humanGuess, computerGuess, targetNum) => {

const humanDiff = Math.abs(targetNum - humanGuess);

const computerDiff = Math.abs(targetNum - computerGuess);

return humanDiff <= computerDiff

};

const updateScore = (winner) => {

if (winner === ‘human’) {

humanScore += 1;

} else if (winner === ‘computer’) {

computerScore += 1;

};

};

const advanceRound = () => currentRoundNumber += 1;

updateScore(‘human’);

updateScore(‘computer’);

advanceRound();

First of all when you have an else if you need to have a final else alternative. Also, can you please link the exercise you were struggling with so we know what kind of program does it actually needs?

https://www.codecademy.com/practice/projects/number-guesser-independent-practice

I didn’t have this in script.js

The rest of my code is similar to yours, but
I didn’t actually call any functions outside of other functions in script.js