What is the purpose of seal method

Posted by Prem Tiwari | Updated on

The Object.seal() method is used to seal an object, by preventing new properties from being added to it and marking all existing properties as non-configurable.

But values of present properties can still be changed as long as they are writable. Let’s see the below example to understand more about seal() method


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers