Class Methods in OOP in JavaScript
You can also make methods in classes. Let's make a test method in our class:
class User {
show() {
return '+++';
}
}
Let's create an object of our class:
let user = new User;
Now let's call our method:
console.log(user.show()); // will bring out '+++'
Make some test method in your Employee class. Call it.