by jonpacker · 12y ago · 0 comments
So...
> var x = {}
> Object.defineProperty(x, 'value', { get: function() { return 1 }, set: function() { console.log('set') } })
> x.value
1
> x.value = 2
set
> x.value
1No comments yet.