0 votes
in JavaScript by
What output will this code present:

var Employee =

{

company: ‘xyz’

}

var Emp1 = Object.create(employee);

delete Emp1.company Console.log(emp1.company);

1 Answer

0 votes
by

Outcome = xyz. In this code, emp1 object uses company as its prototype property. Delete operator does not delete prototype property. The object emp1 does not have company as its property. It is possible to delete company property from the Employee object directly by using delete Employee.company.  

...