Tell us what’s happening:
im absolutely and utterly helpless. ignore the theatrics, this question has completetely failed me. please help
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const checkForStraights = (arr) => {
const sortedNumbersArr = arr((a, b) => a - b);
const uniqueNumbersArr = [...new Set(sortedNumbersArr)];
const uniqueNumbersStr = uniqueNumbersArr.join("");
const smallStraightsArr = ["1234", "2345", "3456"];
const largeStraightsArr = ["12345", "23456"];
if (smallStraightsArr.some(straight => uniqueNumbersStr.includes(straight))) {
updateRadioOption(3, 30);
}
if (largeStraightsArr.includes(uniqueNumbersStr)) {
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();
}
});
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 14