Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let a = { name : 'test', email : 'kepung@gmail.com'}
- a
- {name: "test", email: "kepung@gmail.com"}
- ///////////////////
- Object.keys(a)
- (2) ["name", "email"]
- //////////////////////
- Object.values(a)
- (2) ["test", "kepung@gmail.com"]
- ///////////////////
- Object.entries(a)
- (2) [Array(2), Array(2)]
- 0:(2) ["name", "test"]
- 1:(2) ["email", "kepung@gmail.com"]
- // Getting really alot of info here using
- Object.getOwnPropertyDescriptors(a)
- {name: {…}, email: {…}}
- email:{value: "kepung@gmail.com", writable: true, enumerable: true, configurable: true}
- name:{value: "test", writable: true, enumerable: true, configurable: true}
Add Comment
Please, Sign In to add comment