From the node repl:
foo = { bar: 'baz'};
console.log (Object.getOwnPropertyDescriptor(foo, 'bar'))
Returned value:
{ value: 'baz',
writable: true,
enumerable: true,
configurable: true }
How do you change the writable enumerable, and configurable to false? What are these values called? Are they part of ES5.1? Are there more that the repl didn’t output?
There’s also
Object.defineProperties, which is the same, except you can set multiple properties, andObject.create, which let’s you create a new object, and set its prototype object, and its descriptors.They’re property descriptors.
Yes, ES5.
More what, property descriptors? No.