# Review Algorithmic Thinking by Building a Dice Game - Step 7

### Tell us what’s happening:

hi, can you help me see what I’m doing wrong please?

``````<!-- file: index.html -->

``````
``````/* file: styles.css */

``````
``````/* file: script.js */
// User Editable Region

const getHighestDuplicates = (numbers) => {

const countObject = {};

numbers.forEach((number) => {
if (countObject[number]) {
countObject[number]++;
} else {
countObject[number] = 1;
}
});

const sum = numbers.reduce((a, b) => a + b, 0);

if (highestCount >= 4) {
} else if (highestCount >= 3) {
} else {
}
}

if (rolls === 3) {
} else {
rolls++;
rollDice();
getHighestDuplicates();
}
});

// User Editable Region
``````

El agente de usuario es: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36`

### Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 7

In English:

Hi there. There’s four issues with your code.

`highestCount` is never defined. Your code right now has no idea what the largest count is. You are tracking the numbers though as values in your `countObject` though. You need to determine which is the biggest.

The indexes given to the your `updateRadioButton` are not valid. The function needs a number. If you look to the side, you can see what order they are in. Note: All array indexes start at 0.

Thirdly a four of kind still technically counts as a three of a kind. So the available choices need to include “Three of a Kind”, “Four of a Kind” , and “None” which four of the same dice sides are showing. It’s not exclusive.

Lastly, your function call `getHighestDuplicates` needs the values of the dice passed. Otherwise it has no idea what it is comparing.