Is it possible to have multiple parameters for Object.defineProperty setter function?
E.G.
var Obj = function() {
var obj = {};
var _joe = 17;
Object.defineProperty(obj, "joe", {
get: function() { return _joe; },
set: function(newJoe, y) {
if (y) _joe = newJoe;
}
});
return obj;
}
I don't get any errors from the syntax, but I can't figure out how to call the setter function and pass it two arguments.