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

### Tell us what’s happening:

Please, help me with this step.
My counter variable shows the expected results (it counts how much consecutive numbers are there among the dice), but I still can’t pass the challenge, it still says that when there is a small or a large straight the corresponding radio button should be updated

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

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

const checkForStraights = (arr) => {
let sorted = arr.sort((a, b) => a - b);
let counter = 0;
for (let i = 0; i < 5; i++) {
if (sorted[i] + 1 == sorted[i + 1]) {counter++}
else {counter === 1}
}

if (counter === 5)
};
if (counter === 4) {
}
if (counter < 4) {
}

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

``````

User Agent is: `Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36`

### Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 14

You should update this button if you have 5 numbers too because 5 includes 4

1 Like

Thank you. Done

``````  if (counter >= 4) {
}
``````

Unfortunately, the code still doesn’t pass