main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const part1 = {  
  color: 'white'
};
const part2 = {  
  model: 'Honda'
};
const part3 = {  
  year: 2005
};

const car = {  
  ...part1,
  ...part2,
  ...part3
};
console.log(car); // { color: 'white', model: 'Honda', year: 2005 } 
Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie