restructured

This commit is contained in:
Karan
2021-12-03 14:09:36 +05:30
committed by GitHub
parent 764c4ced23
commit c5f161fc29
+2 -2
View File
@@ -10,9 +10,9 @@ const person2 = new Employee("Jane", "Doe", 5);
const workers = [person1, person2];
Employee.prototype.details = function(){
return this.first + " " + this.last + " has worked here " + this.years + " years"
return this.first + " " + this.last + " has worked here " + this.years + " years";
}
workers.forEach((person) => {
console.log(person.details());
})
});