let AnimalMixin = { eats() { return `${this.name} eats.`; } }; class Employee { constructor(name, age, salary, jobTitle) { this.name = name; this.age = age; this.salary = salary; this.jobTitle = jobTitle; } description() { return `A person named ${this.name} who is ${this.age} years old`; } } Object.assign(Employee.prototype, AnimalMixin); let employee = new Employee("Aurel", 30, 15000, "CEO boss"); console.log(employee.eats()); // Aurel eats.