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

Variable not defined and already been declared at the same time #22707

Closed
benwaffle opened this issue Sep 5, 2018 · 1 comment
Closed

Variable not defined and already been declared at the same time #22707

benwaffle opened this issue Sep 5, 2018 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@benwaffle
Copy link

  • Version: v10.8.0
  • Platform: Darwin Bens-MacBook-Pro.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
$ node
> let i = (console.log(i), 0)
ReferenceError: i is not defined
> i
ReferenceError: i is not defined
> i = 3
ReferenceError: i is not defined
> let i = 4
SyntaxError: Identifier 'i' has already been declared
> i
ReferenceError: i is not defined
@richardlau richardlau added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 5, 2018
@richardlau
Copy link
Member

This gets raised from time to time but is a duplicate of #8309. The behavior is according to spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants