这两个别记混了assign对象合并,concat数组合并,assign去重,concat不去重

const target = { a: 1, b: 2 };
const source = { b: 4, c: 5 };

const returnedTarget = Object.assign(target, source);

console.log(target);
// !!!expected output: Object { a: 1, b: 4, c: 5 }

console.log(returnedTarget);
// expected output: Object { a: 1, b: 4, c: 5 }

let aaa = [1,2]
let bbb = [2,4]

const ccc=aaa.concat(bbb)

console.log(aaa)
//[1,2]

console.log(ccc)
//[1,2,2,4]