Review Algorithmic Thinking by Building a Dice Game - Step 7

Tell us what’s happening:

I checked countOfDupes in a separate JSFiddle, and that performs what I want: it eventually becomes a number that counts the mode. I did it differently from that one tutorial from this site about stats. Is that an issue here?
I don’t understand the logic in the next step, either. It looks like I do something if there are four of a kind, three of a kind, or nothing. But what? I used updateRadioOption(), which requires an index and a score. Do I understand how to score correctly?

Your code so far

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

/* file: styles.css */

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

const getHighestDuplicates = (arrayOfNumbers) => {
  let countOfDupes = [];
  const sum = arrayOfNumbers.reduce((acc, init) => acc + init, 0);
  for (let i=0; i < arrayOfNumbers.length; i++) {
    countOfDupes.push(
      arrayOfNumbers.filter(
        element => element === arrayOfNumbers[i]));
  }
  countOfDupes = countOfDupes.map(element => element.length);
  console.log("Count of Dupes Array: ",countOfDupes);
  countOfDupes = Math.max.apply(null, countOfDupes);
  console.log("Count of Dupes as a number: ", countOfDupes);
  
  if (countOfDupes >= 4) {
    updateRadioOption(1, sum);
  } else if (countOfDupes === 3) {
    updateRadioOption(0, sum);
  } else {
  	updateRadioOption(-1, 0);
  }
}

rollDiceBtn.addEventListener("click", () => {
  if (rolls === 3) {
    alert("You have made three rolls this round. Please select a score.");
  } else {
    rolls++;
    rollDice();
    updateStats();
    
  }
});

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 7

Remember than when there’s four of a kind, by definition it means at the same time there’s also three of a kind. Similarly the option to select None of the above should be there.

Oh? So a four of a kind gives double points, basically? That makes sense. I was wondering what the difference was supposed to be.
For the “none-of-the-above” case, I thought that was included in the default else clause. Thanks for letting me know it should be included explicitly.

Wait, if they can use multiple options, why use radio inputs? Why not use or disabled ?

Use not in a sense that player can get sum of points, from points from both four of a kind and three of a kind at the same time - only one of them can be selected.