...點copy是淺拷貝var obj1 = [1,{a: 1}];//var obj2 = Object.assign( {}, obj1);//淺copy//var obj2 = JSON.parse(JSON.stringify(obj1));//深copyvar obj2 = [...obj1];//淺copyobj2[1].a = 5;obj1;blog