function Child() {}
Child.prototype = new Father()
console.log(new Father(), 'new')
let child = new Child()
let value = 'a'
Object.defineProperty(child, 'a', {
enumerable: true,
configurable: true,
set(a) {
value = a
},
get() {
return value
}
})
console.log(child, 'child')
function Father () {
this.b = 'b'
}
console.log('b' in child)
for (let key in child) {
console.log(key, 'for-in')
}
console.log(child.hasOwnProperty('a'), 'hasOwnProperty-a')
console.log(child.hasOwnProperty('b'), 'hasOwnProperty-b')
delete child.a
console.log(child)
console