object.hasOwnProperty(name)
1 if (typeof Object.beget !== 'function') {
2 Object.beget = function(o) {
3 var F = function() {};
4 F.prototype = o;
5 return new F();
6 };
7 }
8
9 var a = {
10 member: true
11 };
12 var b = Object.beget(a);
13 var t = a.hasOwnProperty('member');
14 var u = b.hasOwnProperty('member');
15 var v = b.member;
16
17 console.log(t);
18 console.log(u);
19 console.log(v);
2 Object.beget = function(o) {
3 var F = function() {};
4 F.prototype = o;
5 return new F();
6 };
7 }
8
9 var a = {
10 member: true
11 };
12 var b = Object.beget(a);
13 var t = a.hasOwnProperty('member');
14 var u = b.hasOwnProperty('member');
15 var v = b.member;
16
17 console.log(t);
18 console.log(u);
19 console.log(v);