function Test(){
this.name='123'
}
var test=new Test()
console.log(t服务器托管网est.name)
function Person(name,age){
this.name="geyao"
this.age=18
}
function Programmer(name,age){
Person.apply(this,[name,age])
this.work="Programmer服务器托管网"
}
var p=new Programmer("geyao",18)
console.log(p)
运行结果
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net