function Foo() { this.foo = 'Foo!'; } function Bar() { this.bar = 'Bar!'; } Foo.prototype = new Bar(); Bar.prototype.baz = 'Baz!'; var obj = new Foo(); console.log('foo' in obj); // true console.log('bar' in obj); // true console.log('baz' in obj); // true console.log(obj.hasOwnProperty('foo')); // true console.log(obj.hasOwnProperty('bar')); // false console.log(obj.hasOwnProperty('baz')); // fal

