by feupan · 4y ago · 0 comments
Then every for-of loop example does not execute anything because it’s creating an inline arrow function without calling it.
>Off-by-one bugs are more probable. For example, you might write i<22 instead, and then the loop would end at 21, not 22.
Ironically, their implementation of a function called "range" differs from the (likely) best known function by that name (that of Python), causing exactly this problem. (Also, the Pythonic range is probably a better fit for a language with 0-based indexing.)