We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var a = { n: 1 } var b = a; a.x = (a = { n: 2 }) console.log(a.n, b.n) console.log(a.x, b.x)
The text was updated successfully, but these errors were encountered:
核心: 为在浏览器中,对象属性的赋值操作会先于变量赋值操作执行。因此,执行 a.x = (a = { n: 2 }) 时,会先将 a 的属性 x 赋值为 undefined,然后再将 a 的值更新为 { n: 2 }
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: