Single Choice
Easy
QWhat would the following JavaScript code produce?
const obj1 = {
ID: #5002
Javascript Classes MCQ
196 views
Question Info
#5002Q ID
EasyDifficulty
Javascript Classes MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
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.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic