Sealing JavaScript Objects Using Object.seal()

JavaScript provides a method Object.seal() which seals an object, preventing new properties from being added to it and marking all existing properties as non-configurable. Values of existing properties can still be changed if they are writable.
Let’s see an example:

Link: https://dzone.com/articles/sealing-javascript-objects-using-objectseal?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev