in JavaScript by
What will be the output of the following JavaScript code?

const obj1 =  




const descriptor1 =Object.getOwnPropertyDescriptor(obj1,'property1');  



a) true 21

b) true false

c) false false

d) true true

1 Answer

0 votes

Answer: D

Reason: In JavaScript, "Object.getOwnPropertDescriptor()" provides the ability to query information about a property in detail. It returns a property's descriptor for that property, which directly presents on an object and not present in the object's prototype of the certain object.

Related questions

0 votes
asked Mar 22 in JavaScript by Robindeniel
0 votes
asked Mar 24 in JavaScript by sharadyadav1986