Guest User

Untitled

a guest
Jan 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. // The newly created object has Object.prototype as its [[Prototype]]
  2. // It has no own property named 'hasOwnProperty'
  3. // hasOwnProperty is an own property of Object.prototype.
  4. // So it inherits hasOwnProperty from Object.prototype
  5. // Object.prototype has null as its prototype.
  6. // PROTOTYPE CHAIN : software ---> Object.prototype ---> null
  7. var software = {language: "JavaScript"};
  8.  
  9. // Arrays inherit from Array.prototype
  10. // (which has methods indexOf, forEach, etc.)
  11. // PROTOTYPE CHAIN : frameworks ---> Array.prototype ---> Object.prototype ---> null
  12. var frameworks = ['React', 'Angular', 'Polymer'];
  13.  
  14. // Functions inherit from Function.prototype
  15. // (which has methods call, bind, etc.)
  16. // PROTOTYPE CHAIN : websiteContent ---> Function.prototype ---> Object.prototype ---> null
  17. function websiteContent() {
  18. return "Hello World!";
  19. }
Add Comment
Please, Sign In to add comment