ob=function(arg){var prop=1, meth=function(x){return x+x;}, setp=function(x){prop=x;}; return eval(arg)};
ob("setp(2)");
console.log(ob("meth(prop)"));
ob = function() {
var x = 1;
return {
meth: function() { return x + x; },
setp: function(y) { x = y; }
}
}();
ob.setp(2);
console.log(ob.meth());
b2I9ZnVuY3Rpb24oYXJnKXt2YXIgcHJvcD0xLCBtZXRoPWZ1bmN0aW9uKHgpe3JldHVybiB4K3g7fSwgc2V0cD1mdW5jdGlvbih4KXtwcm9wPXg7fTsgcmV0dXJuIGV2YWwoYXJnKX07Cm9iKCJzZXRwKDIpIik7CmNvbnNvbGUubG9nKG9iKCJtZXRoKHByb3ApIikpOwoKb2IgPSBmdW5jdGlvbigpIHsKICB2YXIgeCA9IDE7CiAgcmV0dXJuIHsKICAgIG1ldGg6IGZ1bmN0aW9uKCkgeyByZXR1cm4geCArIHg7IH0sCiAgICBzZXRwOiBmdW5jdGlvbih5KSB7IHggPSB5OyB9CiAgfQp9KCk7Cm9iLnNldHAoMik7CmNvbnNvbGUubG9nKG9iLm1ldGgoKSk7