We mentioned the term constructor back in section one, when we talked about making an object using the keyword
new. A constructor is a way to create an object.
When we write
bob = new Object( ); we are using a built-in constructor called
This means we have to add our properties one at a time, just like we've been doing. To review, we've created
bob using the constructor and defined the
name property for you.