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.
Full article