javascript apply与call,求数组最小值,最大值。
apply与call:
function Person(name,age){
this.name = name
this.age = age
}
function Student(name,age,number){
Person.apply(this,arguments)
this.number = number
}
var student = new Student('张三','20','10')
console.log(student)
用student去执行Pers
原创
2020-11-03 08:50:20 ·
275 阅读 ·
0 评论