Closed aleclarson closed 5 years ago
There's a lot of languages that use iterable first, item second syntax (very common in templating languages especially). And you'll see it in almost every language with functions-as-values in the form:
iterable.iterMethod(item => ...)
I think that this is an objectively better order. The most important detail that you should type/read first is the value you are iterating over. And the name of your "item" binding should generally be based on the thing you are iterating over.
What's the motivation behind using
for..as
and not something more familiar likefor..in
orfor..of
?