Sunny-117 / js-challenges

✨✨✨ Challenge your JavaScript programming limits step by step

Home Page:https://juejin.cn/column/7244788137410560055

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

连续赋值操作

Sunny-117 opened this issue · comments

连续赋值操作
let a = { n: 1 }
let b = a

a.x = a = { n: 2 }

console.log(a.x) // => undefined
console.log(b.x) // => { n: 2 }