In below code
var A = function() {};
var a = new A();
var b = new A();
A.prototype = {};
var c = new A();
console.log(a.constructor === b.constructor);
console.log(a.constructor === c.constructor);
output is true and false.
I am interested in the false output. a and c were created using same constructor function which is A - why is their constructor property different? It seems I miss something.
PS. If I remove the line where I am changing prototype of A output is: true true.


a.constructorandc.constructor. This may be relevant stackoverflow.com/questions/11234664/what-does-native-code-mean