Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. What kind of an expression is “new Point(2,3)”?

  2. A.

     Primary Expression

    B.

     Object Creation Expression

    C.

     Invocation Expression

    D.

     Constructor Calling Expression

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    An object creation expression creates a new object and invokes a function (called a constructor) to initialize the properties of that object. Object creation expressions are like invocation expressions except that they are prefixed with the keyword new.


Be The First To Comment