I\'m learning some aspects of Object-oriented Javascript. I came across this snippet
var Person = function(firstName, lastName) { this.lastName = lastName
My guess is that the intent is to create a new object rather than just a reference from Person.
//create a new object with its prototype assigned to Person.prototype Employee.prototype = Object.create(Person.prototype);