Multiple objects of the same class in OOP in JavaScript
You can create several objects of the same class. For example, let's create two users:
let user1 = new User;
let user2 = new User;
Let's give them names:
user1.name = 'john';
user2.name = 'eric';
Let's output these names:
console.log(user1.name);
console.log(user2.name);
Create some objects of class Employee.
Write down the name and salary of each employee in the property.
Display the sum of the salaries of the workers you have created.