Identifying rotten strawberries excercise https://www.codecademy.com/courses/introduction-to-javascript/0/2#

I literally have no idea how to complete this exercise having done the previous JavaScript exercises. Am I missing something?? As is probably very obvious from my code below I am a complete beginner

https://www.codecademy.com/courses/introduction-to-javascript/0/2#

```

//Here is an example of a strawberry index
var index = 20;

//Boolean value rotten
var rotten = false;

//If the index is divisible by five, the strawberry is rotten, so set
//rotten to true. False, otherwise
if ((index % 5) >= 0) {
let rotten = true;
} else {
let rotten = false;
}.

<do not remove the three backticks above>

Hi, just want u to know that i have exactle the same code with the same problem… I even had another idea first with number.integer(). Also this worked out fine, it is just not enough for the programm to let me continue it seems…
If u get an answer let me know :wink:

1 Like

Your code was excellent! thank you, the only thing is switch your let to var. I realized you cant have two separate identifiers (or tokens I am still super new). Would not have been able to figure out the percentage coding without you though @footmouse @boardpro05803

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.