function fn(){};
console.log(fn.prototype);
Parent(name,age){
Parent.prototype.name=name;
Parent.prototype.age=age;
Parent.prototype.arr=["123","we"];
Parent.prototype.sayHi=(){
console.log("Hi");
};
}
console.log(Parent.prototype.constructor===Parent);//true
var t= new Parent("huan",12);
console.log(Parent.constructor);function Function
console.log(t.constructor);function Parent()
t.__proto__=Parent.prototype
var Foo= Foo(){};
Foo.prototype.x=1;
var foo=new Foo();
Foo.prototype={x:2,constructor:Parent};
var foo1= Foo();
console.log(foo.x); 1
console.log(foo1.x);2
console.log(foo1.constructor===Foo);flase
console.log(foo.constructor===Foo);true
console.log(foo1.constructor===Parent);true
console.log(foo.constructor===Parent);flase