Q. The method that can be used to create new properties and also to modify the attributes of existing properties is

  • (A) Object.defineProperty()
  • (B) Object.defineProperties()
  • (C) Both Object.defineProperty() and Object.defineProperties()
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both Object.defineProperty() and Object.defineProperties()
Explanation: When used to define new properties, any attributes you omit default to false. Therefore, both Object.defineProperty() and Object.defineProperties() can be used to create and modify the attributes.
Explanation by: Mr. Dubey
When used to define new properties, any attributes you omit default to false. Therefore, both Object.defineProperty() and Object.defineProperties() can be used to create and modify the attributes.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
156
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate