Weird explanation in MDN Docs?
So here, they explain how the
The weird thing comes when this gets repeated for the second element. So the
Any explanation to help understand this would be appreciated, thanks!
for...of loop works. And they essentially said that it takes the first element in fruits and sets that value to the fruit variable, then runs the JS code in the curly braces.The weird thing comes when this gets repeated for the second element. So the
fruit variable gets re-initialized to the second element in fruits, but the problem is, fruit is a const, so how does this work?Any explanation to help understand this would be appreciated, thanks!

