O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

How to use a Constructor

We said using a constructor is a two-step process: first we create a constructor, then we use it. Well, we’ve created a Dog constructor, so let’s use it. Here’s how we do that:

image with no caption

So, to create a new dog object with a name of “Fido”, a breed of “...


Cover of Head First JavaScript Programming


How do you create an object using the constructor and not the object literals?