function foo(name,age){
this.name = name
this.age = age
this.class ='class-1'}
var f = new foo('zhangsan',23)
console.log(f.__proto__ === foo.prototype);//true
//__proto__ 隐式原型//prototype 显示原型
function adf(name, age){
this.name ='hahahah';}
adf.prototype.alertName = function (){alert(this.name);};
var a = new adf("xiang");
a.printName = function (){
console.log(this.name);};
console.log(adf.prototype,"adf.prototype");
console.log(a.printName);
console.log(a.alertName);