function Base() { this.name='name' this.age=18 } Base.prototype={ say() { alert('hi') }, ex:'lucy' } function Student() { Base.call(this,arguments)////// 删除这句话也可以,为什么?????? this.add='US' } Student.prototype=new Base()//只通过这个就行,那还要上面的call有什么用? let tom=new Student() tom.say()
添加回答
举报
0/150
提交
取消
