The role of a constructor function is to create multiple objects. That share certain qualities and behaviors. Basically, a constructor function is a cookie cutter for producing objects. That have default properties and property methods.
If you said, “A constructor is nothing more than a function,” . Then I would reply, “You are correct—unless that function is invoked using the new keyword.” (For example, new String(‘ foo’)).
Table of Contents:
1 Java Script Objects
2 Working with Objects and Properties
6 Working with Primitive String, Number, and Boolean Values
9 The Head/Global Object
12 The this Keyword
13 Scope and Closures
14 Function Prototype Property
16 Math Function