daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var obj = {
  2.     value: 0,
  3.     get() {
  4.         return this.value;
  5.     },
  6.     set(v) {
  7.         this.value = v;
  8.     }
  9. };
  10.  
  11. obj.value; // 0
  12. obj.value = 1;
  13. obj.value; // 1
RAW Paste Data
Top