topic description
var a = [1,2,3];
var b = a;
a = [4,5,6];
alert(b); //[1,2,3]
var a = [1,2,3];
var b = a;
a.pop();
alert(b); //[1,2]
//
topic source
< hr >
a = [4,5,6];//a
a.pop();//a
b = a;//bbaa
//ab
but I don"t think it makes sense. I think it should be this execution order, but from the result, I am wrong ~
a = [4,5,6];//a
b = a; //
a.pop();
after reading their answers in Zhihu this morning, can you give me a brief and concise answer?
I would like to give you some advice on my order.