What are the different ways to make an object non-extensible?

Posted by Jennifer | Updated on

You can mark an object non-extensible in 3 ways,

  1. Object.preventExtensions
  2. Object.seal
  3. Object.freeze


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