Mark一道经典阿里面试题

281 阅读1分钟
let a = {n:1};
let b = a;
a.x = a = {n:2};
console.log(a.x, b); //undefined {n:1,x:{n:2}}