Class Methods in OOP in JavaScript

You can also make methods in classes. Let's make a test method in our class:

javascriptclass User {
  show() {
    return '+++';
  }
}

Let's create an object of our class:

javascriptlet user = new User;

Now let's call our method:

javascriptconsole.log(user.show()); // will bring out '+++'
Задание 1

Make some test method in your Employee class. Call it.