To prevent modifications to an object’s prototype, the _________ method can be used to seal the prototype.

  • Freeze
  • Seal
  • PreventExtensions
  • Protect
The seal method in JavaScript can be used to prevent any further addition or deletion of properties on an object, including its prototype. This ensures that the prototype remains fixed and cannot be modified.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *