Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. var obj = { a: 1, b: 2 };
  2. Object.setPrototypeOf(obj, {c: 3});
  3. Object.defineProperty(obj, 'd', { value: 4, enumerable: false });
  4.  
  5. // what properties will be printed when we run the for-in loop?
  6. for(let prop in obj) {
  7. console.log(prop);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement