HTML and CSS Reference
> obj3.firstName = 'Jim'
> obj3.firstName = 'Duffey'
> obj3.age = 42
As you can see we have retained the method already defined on its prototype.
There are potential pitfalls in this implementation. For instance, if you forget to set a prop-
erty on the newly cloned object, it will retain the value from the object it was cloned from:
this may or may not be correct, and could become a source of bugs.
Although we will examine more advanced approaches to object creation below, the ap-
proach to objects examined in this section has a lot to recommend it.