fork download
  1. function Test() {
  2. 'use strict';
  3. var unit = null;
  4. Object.defineProperty(this, 'unit', {
  5. get: function() {
  6. //console.log('get unit');
  7. return unit;
  8. },
  9. set: function(val) {
  10. console.log('unit->', val);
  11. unit = val;
  12. },
  13. enumerable: true
  14. });
  15. }
  16. var t = new Test();
Success #stdin #stdout 0.01s 30272KB
stdin
Standard input is empty
stdout
Standard output is empty