I am aware of the fact that functions in JavaScript lead a dual life first of a function (as first class thing to create instances from) and the second one of a normal object.
But I am surprised to see the output of the following console.
function A() {
console.info("A");
}
console.info(A.prototype.constructor === A.constructor); // false
I expected it to be true as I was not expecting constructor property on the object A as it's own property. And hence following the prototypical chain lookup it should have been the same object as A.prototype.constructor. Where am I wrong or what piece am I missing?