Prototype-based Inheritance in JavaScript with Constructors using Object.create()

const object1 = { property1: 42 // object1 with property1 set to 42 } const descriptor1 = Object.getOwnPropertyDescriptor(object1, 'property1'); // descriptor for object1's property1 console.log(descriptor1.configurable); // logs whether property1 is configurable console.log(descriptor1.enumerable); // logs whether property1 is enumerable console.log(descriptor1.value); // logs the value of property1

Output: