If a small straight is rolled, your checkForStraights function should enable the fourth radio button, set the value to 30 , update the displayed text to , score = 30 and leave the fifth radio button disabled.
The last part means that the fifth radio button is also disabled.
The code logic is not allowing for that.
Declare a checkForStraights function which accepts an array of numbers. If the user gets a large straight, update the fifth radio button with a score of 40 . If the user gets a small straight, update the fourth radio button with a score of 30 . Regardless, it should always update the last radio button to display a score of 0, with the correct attributes.
If a small straight is rolled, your checkForStraights function should enable the fourth radio button, set the value to 30 , update the displayed text to , score = 30 and leave the fifth radio button disabled.
The hint message is a bit misleading. You can ignore the and leave the fifth radio button disabled part when updating the fourth radio button.
After setting the third and fourth radio buttons … Regardless, it should always update the last radio button to display a score of 0, with the correct attributes.
Your original post contained an else statement which prevents updating the fifth radio button for all cases.
did that but still having same error i think i am missing a point like where if array is containing small straight with one different number the code is not doing that part i was thinking of a for of loop that checks when array length is 5 it should check if there is four straight like 12346 it should do it. i am gonna do that now i think it would work then thankyou for your time and help.