<script>
function fn(x, y) {
console.log(this);
console.log(x + y);
}
let o = {
name: "我的",
};
fn.call(o, 1, 2);
function Father(name, sex, age) {
this.name = name;
this.sex = sex;
this.age = age;
}
function Son(name, sex, age) {
Father.call(this, name, sex, age);
}
var son = new Son("刘德华", "男", 18);
console.log(son.age);
console.log("-----------------------------");
var arr = [99, 15, 25, 36, 87];
var max = Math.max.apply(Math, arr);
console.log(max);
console.log("-------------------------------");
function f(a, b) {
console.log(this);
console.log(a + b);
}
let p = { mingzi: "卢航" };
f(1, 2);
f.bind(p, 1, 2)();
</script>