main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const person = {  
  name: 'Dave',
  surname: 'Bowman'
};

Object.defineProperty(person, 'age', {  
  enumerable: false, // Make the property non-enumerable
  value: 25
});
console.log(person);

const clone = {  
  ...person
};
console.log(clone); // => { name: 'Dave', surname: 'Bowman' }  
Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie