restructured

This commit is contained in:
Karan 2021-12-03 14:09:36 +05:30 committed by GitHub
parent 764c4ced23
commit c5f161fc29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());
})
});