-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong behavior in for loop #8498
Comments
Hey @uni-zheng! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
Hi I'm going to try to look at this. Thanks! |
@nicolo-ribaudo Is it a better choice to add a closure inside the block scope or to rename the block scoped variable that is colliding with the for loop initializer? |
Renaming the variable would be better, but if it is too complex we can just wrap the for body in a block, like in #8920, since it isn't a common case. |
Bug Report
Current Behavior
Just print log once.
Input Code
Output Code
Expected behavior/code
print log 3 times
Environment
use https://new.babeljs.io/repl
set presets both es2015 and stage-3
version v6.26.0
Possible Solution
Should create temporary variable in body.
The text was updated successfully, but these errors were encountered: