var obj1 = {"a": 1} var obj2 = {"b": 2} var obj3 = {"c": 3} // 将需要合并的对象传入Object.assign方法中 var objs = Object.assign(obj1, obj2, obj3) console.log(objs)
var obj1 = {"a": 1} var obj2 = {"b": 2} var obj3 = {"c": 3} // 将需要合并的对象传入Object.assign方法中 var objs = Object.assign(obj1, obj2, obj3) console.log(objs)