I find it pretty confusing that of compiles to in and in arraywise operations.
It'd be easier for beginners if we kept the meaning of in from JS and then introduced of for a cool addition.
According to Jeremy it's all about readability, but for me neither reads much better than another:
- Current
for key of object
for item in array
- Proposed
for key in object
for item of array
Do you feel one much more readable than another?
I find it pretty confusing that
ofcompiles toinandinarraywise operations.It'd be easier for beginners if we kept the meaning of
infrom JS and then introducedoffor a cool addition.According to Jeremy it's all about readability, but for me neither reads much better than another:
for key of objectfor key, value of objectfor item in arrayfor item, index in arrayfor key in objectfor key, value in objectfor item of arrayfor item, index of arrayDo you feel one much more readable than another?