如下所示,对象可通过_proto_属性指定本身继承自哪里,或自身的原Type是什么。
TypeA->TypeB->TypeC,形成了连续继承,即原型链
<script>
let TypeA={"name":"Jim","sex":"male"};
let TypeB={"age":0};
TypeB.__proto__=TypeA;
console.log("TypeB:"+TypeB.name);
let TypeC={"height":100};
TypeC.__proto__=TypeB;
console.log("TypeC:"+TypeC.name);
</script>