log = console.log

let a = {
    info() { return this.val }
}

let b = {
    val: 200,
    __proto__: a
}

let c = Object.create(a)
c.val = 300


let d = { val: 400 }
Object.setPrototypeOf(d, a)

log(a)
log(b, c, d)
log(b.val, c.val, d.val)
log(b.info(), c.info(), d.info())
log(b.__proto__,c.__proto__,d.__proto__)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: