Posted By

sensenseng on 07/13/09


Tagged

test


Versions (?)

test


 / Published in: JavaScript
 

  1. var obj = {
  2. yes: function() {
  3. this.val = true;
  4. },
  5. no: function() {
  6. this.val = false;
  7. }
  8. };
  9. alert(obj.val == null);
  10. obj.yes();
  11. alert(obj.val == true);
  12. window.no = obj.no;
  13. window.no();
  14. alert(obj.val == true);
  15. alert(window.val == false);

Report this snippet  

You need to login to post a comment.