<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
function Person()
{
this.name=null;
this.age=0;
this.say=function()
{
console.log(this.name, this.age);
}
}
function Student()
{
this.score=0;
this.study=function()
{
console.log("day day up");
}
}
Student.prototype=new Person();
Student.prototype.constructor=Student;
let stu = new Student();
stu.name = "zs";
stu.age = 18;
stu.score = 99;
stu.say();
stu.study();
</script>
</body>
</html>