# 第5章 继承

# Object.create

  function ppp(){
    var obj={a:1};
    var old=obj;
    obj.a=2;
    obj=Object.create(obj)
    console.log(obj,old);//{__proto__:{a:2}},{a:2}
  }
  ppp()
1
2
3
4
5
6
7
8