Object Descriptors & Property Flags

How does a non-writable prototype property affect derived objects?
const proto = Object.defineProperties({}, {
  greeting: {
    value: 'Hello',
    writable: false,
    enumerable: true
  }
});

const obj = Object.create(proto);
obj.name = 'World';

Object.defineProperty(obj, 'message', {
  get() { return `${this.greeting}, ${this.name}!`; },
  enumerable: true
});

console.log(obj.message);
obj.greeting = 'Hi';
console.log(obj.message);
Next Question (33/40)