(function(){
var u = {
a: 1, b: 2 };
var r = {
m: function(k){
return u[k];
}
}
window.r = r;
})()
var R = window.r;
alert(r.m('a'))
alert 打印的是?
能不能通过r.m获取到u?
Object.defineProperty(Object.prototype, 'key1', {
get : function(){
return this;
}
});
console.log(R.m('key1'));