Object.assign(目标对象,part1,part2),合并复制对象
let json = {a:1};
let json1 = {b:2,a:2};
let json2 = {c:3};
let obj = Object.assign({},json,json1,json2);
console.log(obj)//{a:2,b:2,c:3}
一般用来用户传递了就用用户传的
function ajax(options){//用户传的
let default = {默认的
type:'get',
data:{}
}
Object.assign({},default,options)
}