-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
assignment for jsx in double circulation #11476
Comments
This fills the top-level array with two references to the same Array object: let res = new Array(2).fill(new Array(2)); So in the second iteration of the loop, you override the values set during the first iteration. |
This was referenced Dec 30, 2023
This was referenced Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
bug,maybe~
What is the current behavior?
What is the expected behavior?
it's very strange,
i
should not start with 0?Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
The text was updated successfully, but these errors were encountered: