Wscats / CV

:see_no_evil:Front End Engineer Curriculum Vitae - 面试宝典和简历生成器
http://wscats.github.io/CV/omi/build/index.html
1.04k stars 203 forks source link

由ES规范学JavaScript(二):深入理解“连等赋值”问题 #9

Closed Wscats closed 2 years ago

Wscats commented 7 years ago

有这样一个热门问题:

var a = {n: 1};
var b = a;
a.x = a = {n: 2};
alert(a.x); // --> undefined
alert(b.x); // --> {n: 2}

由ES规范学JavaScript(二):深入理解“连等赋值”问题