class Employee { constructor(name, lastName, salary) { this.name = name; this.lastName = lastName; this.salary = salary; } getSalaryInfo() { let self = this; // use a variable in outer scope to // preserver the value of `this` function calculateMonthlyWages() { return { name: self.name + ' ' + self.lastName, monthlyWages: self.salary / 12, salary: self.salary } } return calculateMonthlyWages(); } } const alexis = new Employee('Alexis', 'Rose', 500_000) console.log(alexis.getSalaryInfo());