- A 2
- B 4
- C undefined
- D error
- Share this MCQ
Answer:
D
Share this MCQ
The Object.seal()
method in JavaScript is used to seal an object, which means that it prevents new properties from being added to the object and marks all existing properties as non-configurable. Sealed objects cannot be deleted, and their existing properties cannot be changed or removed.
To seal an object, you pass the object as an argument to the Object.seal()
method and it returns the sealed object.
Share this MCQ