Created
May 30, 2018 04:02
-
-
Save cyberpirate92/57566ca230677bfcc2ffc3889a1786c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var z = { | |
name: 'Bill', | |
age: 30 | |
} | |
Object.keys(z); // ['name', 'age'] | |
Object.defineProperty(z, 'name', { enumerable: false }); | |
Object.keys(z); // ['age'] | |
// to get all properties (including non-enumerable properties) | |
Object.getOwnPropertyNames(z); // ['name', 'age'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment