1. 数组里面每一项是基本数据类型的一个深拷贝
    1. var arr = [1,2,3];
    2. var sum = [...arr];
    3. console.log(sum)
    4. arr.push(4);
    5. console.log(sum)

    深拷贝

    1. var arr = [1,2,3];
    2. var sum = [].concat(arr);
    3. console.log(sum)
    4. arr.push(4);
    5. console.log(sum)
    1. var arr = [1,2,3];
    2. var sum = arr.slice(0);
    3. console.log(sum)
    4. arr.push(4);
    5. console.log(sum)