JavaScript Professional — Hard
Key points
- Object.getOwnPropertyDescriptor focuses on own properties
- in operator checks prototype chain properties
- Object.getOwnPropertyDescriptor returns descriptor or undefined
- in operator returns a boolean
- Key difference lies in the scope of properties checked
Ready to go further?
Related questions
