js中连续赋值
连续赋值(1)
1 var a = {n:1}; 2 var b = a;//{n:1) 3 a = {n:2}; 4 a.x = a; 5 console.log(a.x);// { n: 2, x: [Circular] } 6 console.log(b.x);// undefined
精品讲解地址:https://blog.csdn.net/lvchunai/article/details/93971409
连续赋值(2)
1 var a = {n:1}; 2 var b = a;//{n:1) 3 a.x = a = {n:2}; 4 console.log(a.x);//undefined 5 console.log(b.x);//{n:2}
精品的讲解地址:https://blog.csdn.net/weixin_34088583/article/details/89085477?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.nonecase
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步