There are 2 ways to call the parent constructor in the child.
var A = function A() {
this.x = 123;
};
var B = function B() {
// 1. call directly
A.call(this);
// 2. call from prototype
A.prototype.constructor.call(this);
};
B.prototype = Object.create(A.prototype);
B.prototype.constructor = B;
Are there any situations when one would be safer/better than the other, or are they always equivalent?