Guest User

Untitled

a guest
Feb 26th, 2018
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. let a = { name : 'test', email : 'kepung@gmail.com'}
  2.  
  3. a
  4. {name: "test", email: "kepung@gmail.com"}
  5.  
  6. ///////////////////
  7. Object.keys(a)
  8. (2) ["name", "email"]
  9.  
  10.  
  11. //////////////////////
  12. Object.values(a)
  13. (2) ["test", "kepung@gmail.com"]
  14.  
  15.  
  16. ///////////////////
  17. Object.entries(a)
  18. (2) [Array(2), Array(2)]
  19. 0:(2) ["name", "test"]
  20. 1:(2) ["email", "kepung@gmail.com"]
  21.  
  22. // Getting really alot of info here using
  23.  
  24. Object.getOwnPropertyDescriptors(a)
  25.  
  26. {name: {…}, email: {…}}
  27.  
  28. email:{value: "kepung@gmail.com", writable: true, enumerable: true, configurable: true}
  29. name:{value: "test", writable: true, enumerable: true, configurable: true}
Add Comment
Please, Sign In to add comment