Object Descriptors & Property Flags

What encapsulation pattern does this code demonstrate?
function Person(name) {
  Object.defineProperty(this, 'name', {
    get() { return name; },
    enumerable: true
  });
}

const person = new Person('John');
console.log(person.name);
person.name = 'Jane';
console.log(person.name);
Next Question (21/40)