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
I have a problem to iterate inside for of loop over array.entries(). Compiled version of code trys to get length property of array.entries but this property is undefined, coz array.entries returns Iterator which has not length property. Code
It is ok that my code wont works properly by default and i should use flags for it. I thought that when i set target as ES5 it will compile working code by default.
I believe this has been discussed before, but I couldn't find much in search. In ##34572@DanielRosenwasser states "We have opinionated defaults for downlevel iteration." as a side comment but doesn't elaborate further.
I have a problem to iterate inside
for of
loop overarray.entries()
. Compiled version of code trys to getlength
property ofarray.entries
but this property is undefined, cozarray.entries
returnsIterator
which has notlength
property.Code
Expected behavior:
Code will iterate over a.entries and call console.log()
How it works in babel: Babel Playground
Actual behavior:
Nothing happens, coz no iteration.
Playground Link: Playground
The text was updated successfully, but these errors were encountered: