Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script>
  2. function A() {}
  3. alert(A.prototype.constructor);
  4. A.prototype.f = 5;
  5. var b = new A();
  6. alert(b.f);
  7. alert(b.__proto__.f);
  8. alert(b.prototype);
  9. alert(A.prototype.f);
  10. alert(A.__proto__.f);
  11. alert(b.constructor.prototype.f);
  12. A.prototype.f = 6;
  13. alert(b.f);
  14. b.f = 7;
  15. alert(b.f);
  16. alert(b.__proto__.f);
  17. b.f = undefined;
  18. alert(b.f);
  19. delete(b.f);
  20. alert(b.f);
  21. </script>