Creating your own object part 2
Creating Objects
Once you have an object constructor, you can use the new keyword to create new objects of the same type.
p1 and p2 are now objects of the person type. Their properties are assigned to the corresponding values.
Comments
Post a Comment