Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 339 Bytes

class.md

File metadata and controls

20 lines (16 loc) · 339 Bytes

class Person1 { name = 'dell'; getName() { return this.name; } }

const person1 = new Person();

console.log(person.getName());

class Teacher extends Person1 { getTeacherName() { return 'mjt'; } }

const teacher = new Teacher(); console.log(teacher.getName()); console.log(teacher.getTeacherName());