DEV Community

Calvin
Calvin

Posted on

Reading Snippets [19]

Constructor functions make new object values. The this variable is used to add and define properties of an object inside a constructor's code block.

The difference between a constructor function and a normal function is the use of the new operator which makes the context (this) in the function the new instance.

Top comments (0)