enumerable控制了你是否是可枚举的属性,为false为不可枚举属性反之为可枚举属性,也就是我们可以访问到的属性
var person = {
name: 'gopal',
};
person.age = '21';
person['country'] = 'India';
Object.defineProperty(person, 'salary', {
value: '80,000$',
enumerable: false,
});
document.write(Object.keys(person));