Single Choice Easy

QIt is possible to both create new properties and change the attributes of already-existing properties using the following technique:

ID: #4997 Javascript Classes MCQ 189 views
Question Info
#4997Q ID
EasyDifficulty
Javascript Classes MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Object.defineProperty()
  • B Object.defineProperties()
  • C Both Object.defineProperty() and Object.defineProperties()
  • D Object.inherit()
Correct Answer

Explanation

The Object.defineProperty() method is used to define a new property on an object, or to modify an existing property on an object. It returns the object. Both Object.defineProperty() and Object.defineProperties() can be used to define new properties on an object.

Share This Question

Challenge a friend or share with your study group.