main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const laptop = {  
  name: 'MacBook Pro',
  screen: {
    size: 17,
    isRetina: true
  }
};

const laptopDeepClone = {  
  ...laptop,
  screen: {
     ...laptop.screen
  }
};

console.log(laptop === laptopDeepClone);               // => false  
console.log(laptop.screen === laptopDeepClone.screen); // => false  
Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie