All examples of for...of
that I have seen use let
to define the iteration variable, for example here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
Is it not a good style to say something like
for (const x of xs) {
...
}
if x
is never changed inside the body of the loop?