In the code below, I change the Person.sayHello method to say 'Bye'. The debugger shows that the method has been changed, but the constructors method is still getting used. Why?
function Person(){
this.sayHello = function(){
console.log("Hello");
}
}
Person.sayHello = function(){
console.log("Bye");
}
console.log(Person.sayHello);
// function (){console.log("Bye");}
var p = new Person();
p.sayHello();
//Hello