摘要: 1 let a = { n: 1 }; 2 const b = a; 3 a.x = a = { n: 2 }; 4 console.log('a.x:', a.x); // undefined 5 console.log('b.x:', b.x); // {n:2} 在b=a时,堆栈中引用的是同一 阅读全文
posted @ 2023-09-01 09:13 人恒过 阅读(19) 评论(0) 推荐(0)