Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

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

  2. A.

     Object.defineProperty()

    B.

     Object.defineProperties()

    C.

     Both Object.defineProperty() and Object.defineProperties()

    D.

     None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    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.


Be The First To Comment