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

### Tell us what’s happening:

Hello, I tried every test that I could thought of, they all pass, i check same for the preview, but my code isn’t accepted, i check similar question on the forum, but i don’t find a similar issue to mine.

some array i tested:
[3, 6, 5, 7, 4]
[2, 3, 1, 5, 4]
[1, 2, 3, 4, 6]
[2, 2, 1, 5, 4]
[1, 2, 1, 3, 4]

Btw if someone can modify the example to what a straight is, change 12345 for 13425 for example, gonna be easier for non native english speaker to understand the task.

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

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

const checkForStraights = (arr) => {
let straightsSet = new Set(arr);
let straightsArray = Array.from(straightsSet);
straightsArray.sort((a, b) => a - b);

for (let i = 0; i <= straightsArray.length - 3; i++) {
let count = 1;

for (let j = i; j < straightsArray.length - 1; j++) {
if (straightsArray[j] + 1 === straightsArray[j + 1]) {
count++;
} else {
break;
}
}

if (count >= 5) {
}

if (count === 4) {
}
}

};

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

// User Editable Region
``````
``````/* file: styles.css */

``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36`