class Person{
constructor(name) {
this.name=name
}
say(){
console.log('hi:'+this.name)
}
}
const p=new Person("howhy")
class Student extends Person{
constructor(name,grade) {
super(name)
this.grade=grade
}
study(){
console.log(this.name+" is on "+this.grade)
}
}
p.say();
const st=new Student("s1","33")
st.study()