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

Error not thrown when swapping two variables on a single line #210

Open
dillan-wilson opened this issue Oct 12, 2021 · 0 comments
Open

Error not thrown when swapping two variables on a single line #210

dillan-wilson opened this issue Oct 12, 2021 · 0 comments

Comments

@dillan-wilson
Copy link

let arr = [1, 2, 3] arr[0],arr[2] = arr[2], arr[0] console.log(arr)

This should throw an error, but it does not and simply prints out 1, 2, 3. The left hand side is not flagged as a comma operator.

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

No branches or pull requests

1 participant