js 数组被赋值变化后,保留原数据 - $.extend
var a = [1];
console.log(a);//[1]
var b = $.extend(true, [], a);
a = [1,2];
console.log(a);//[1,2]
console.log(b);//[1]
var a = [1];
console.log(a);//[1]
var b = $.extend(true, [], a);
a = [1,2];
console.log(a);//[1,2]
console.log(b);//[1]