19.
How can you check if an object has a specific property in JavaScript?
obj.hasOwnProperty()
Object.keys()
Object.prototype.hasOwnProperty()
obj.propertyIsEnumerable()
Correct: A, C
The hasOwnProperty() method can be used to check if an object has a specific property. It returns a boolean value indicating whether the object has the property directly on itself (not inherited). Another option is to use Object.prototype.hasOwnProperty(), which is the same as the hasOwnProperty() method but accessed through the prototype chain.