Tell us what’s happening:
I have been fighting with this step for hours, read through the forum post solutions, and I am still stuck. It is telling me the problem is occurring with the update radio function. Am I anywhere near close?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const getHighestDuplicates = ((arr) => {
const sum = arr.reduce((a, b) => a + b, 0);
let count = 0;
let highestCount = [];
for (let j = 0; j < arr.length; j++) {
count++;
}
highestCount.push(count.value);
highestCount.sort()
score = sum;
if (highestCount[0] >=3){
updateRadioOption(0,score)
};
if (highestCount[0] >=4) {
updateRadioOption(1,score)
};
updateRadioOption(5, 0)
})
rollDiceBtn.addEventListener("click", () => {
if (rolls === 3) {
alert("You have made three rolls this round. Please select a score.");
} else {
rolls++;
rollDice();
updateStats();
getHighestDuplicates(diceValuesArr)
}
});
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 7