Tell us what’s happening:
I’ve truly tried everything I can think of but it is still telling me to fix the small straight and activate the none of the above option when no straight is rolled
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const checkForStraights = (arr) => {
const counts = {};
const sorted = arr.sort((a,b)=> a-b);
const diceNum = Number(sorted.join());
if (diceNum === 1234 || 2345 || 3456){
updateRadioOption(3, 30);
} if (diceNum === 12345 || 23456){
updateRadioOption(3, 30);
updateRadioOption(4, 40);
}
updateRadioOption(5, 0)
}
rollDiceBtn.addEventListener("click", () => {
if (rolls === 3) {
alert("You have made three rolls this round. Please select a score.");
} else {
rolls++;
resetRadioOptions();
rollDice();
updateStats();
getHighestDuplicates(diceValuesArr);
detectFullHouse(diceValuesArr);
checkForStraights(diceValuesArr)
}
});
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 14