var a = [], b = [];
a.push('a');
a.push('b');
a.push('c');
b = a;
b.push('d');
console.log(a);
Why is a = ["a", "b", "c", "d"] ?, how to avoid this cross reference when doing b=a; I would like just to have 2 separates objects, independants
and at the end a = ["a", "b", "c"], and b = ["a", "b", "c", "d"]