Freeze method in JavaScript

The freeze() method is used to freeze an object. Freezing an object does not allow adding new properties to an object, prevents from removing and prevents the enumerability, configurability or writability of existing properties i.e It returns the passed object and does not create a frozen copy. const obj = { prop: 100 }; object.freeze(obj); … Read more