Inheritance of public methods in OOP in JavaScript

The child class inherits all public methods of the parents. Let's look at an example. Let's say we have a class with the following methods:

javascriptclass User {
  setName(name) {
    this.name = name;
  }
  getName() {
    return this.name;
  }
}

Let the following class inherit from this class:

javascriptclass Student extends User {
  
}

Let's check that the methods are inherited. Let's create a new object with a student:

javascriptlet student = new Student;

Let's set its name using the inherited method:

javascriptstudent.setName('john');

Let's read its name using the inherited method:

javascriptlet name = student.getName();
console.log(name);
Задание 1

Check that your Employee class inherits methods from the User class.