You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see that using `for...of` makes *intent* clearer and also decreases the amount of code you have to write (and variable names you need to come up with).
45
45
46
46
#### Limitations
47
-
If you are not targeting ES6 or above, the generated code assumes the property `length` exists on the object and that the object can be indexed via numbers e.g `obj[2]`. So it is only supported on `string` and `array` for these legacy JS engines.
47
+
If you are not targeting ES6 or above, the generated code assumes the property `length` exists on the object and that the object can be indexed via numbers e.g.`obj[2]`. So it is only supported on `string` and `array` for these legacy JS engines.
48
48
49
49
If TypeScript can see that you are not using an array or a string it will give you a clear error *"is not an array type or a string type"*;
0 commit comments