So my question is really in code. Please refer to the following section:
function Person(){};
function Ninja(){};
// Creating ninja object
var ninja = new Ninja();
console.log("ninja constructor with empty prototype object = " +
ninja.constructor);
// Attaching new prototype to Ninja
Ninja.prototype = new Person();
console.log("ninja constructor with prototype(Person) = " +
ninja.constructor);
// The previous console.log printed out the correct value. Now for the
// confusing part! For every other new Ninja object the constructor is no more
// Ninja
var ninja1 = new Ninja();
console.log("ninja1 constructor with prototype(Person)= " +
ninja1.constructor);
var anotherNinja = new Ninja();
console.log("anotherNinja constructor with prototype(Person)= " +
anotherNinja.constructor);
console.log("Again ninja constructor with prototype(Person)= " +
ninja.constructor);
How is the constructor of the new objects pointing to Person? They were originally created from Ninja. This happened only after I changed the prototype of Ninja.
However, the previous Ninja object I created before changing the prototype still holds true its constructor still points to Ninja even though the prototype was changed.