It’s better to provide a link to the exercise so that others can have a look on the exercise itself and you can learn how to format your code here.
The exercise asked:
//If the index is divisible by five, the strawberry is rotten, so set
//rotten to true. False, otherwise
So you just need var
index and var
strawberries is not needed.
How to check index is divisible by five? What value should you compared to if the index is divisible by five?
if ( ________ % 5 === _____ )
Next, if index is divisible by 5, means if the condition is true, set rotten to true, so you need to reassign value to rotten, like this:
rotten = true;
Now finish the code for the else part with the same method above.
Hope this clarifies