JS

Objects in JavaScript - Object

4.

What is the purpose of the Object.prototype.hasOwnProperty() method in JavaScript?

It is used to create a new object with a specific prototype.

It is used to retrieve the prototype object of an object.

It is used to check if an object has a specific property.

It is used to assign a new value to a property of an object.