Skip to content
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

support https://developer.mozilla.org/en/New_in_JavaScript_1.7#let-scoped_variables_in_for_loops #116

Open
GoogleCodeExporter opened this issue Apr 2, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. configure js2-language-version to 180.
2. edit a function like this:

function letscope() {
    let k = 0;
    for (let i = 0; i < 10; i++) {
        k++;
    }
    for (let i = 0; i < 10; i++) {
        k++;
    }
}


3. check it for errors.


What is the expected output? What do you see instead?

expected: no errors (see link in subject line).
actual: at second "let i": TypeError: redeclaration of variable i.

What version of the product are you using? On what operating system?

js2-mode: 20090723b
emacs: 22

Please provide any additional information below.




Original issue reported on code.google.com by [email protected] on 26 Feb 2010 at 8:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant