QuizNot attempted
Mutability matrix
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Changing the value of an existing property
Object.sealmakes the object non-extensible and every property non-configurable, but leaves values writable, so changing an existing value still works.- Not adding: sealed objects are non-extensible.
- Not deleting: non-configurable properties can't be deleted.
- Not redefining as non-enumerable: changing attributes requires configurable.
freezeadditionally makes values non-writable- check with
Object.isSealed/isFrozen.