阿里

连续赋值的理解:原帖 http://www.iteye.com/topic/785445  底下某层楼理解的号

  1. var a = {n:1};  
  2. var b = a; // 持有a,以回查  
  3. a.x = a = {n:2};  
  4. alert(a.x);// --> undefined  
  5. alert(b.x);// --> [object Object]  
posted @ 2016-02-02 22:58  venoral  阅读(199)  评论(0编辑  收藏  举报