function B(){ this.b = "Hello"; } function A(){ this.a = 123; B.apply(this, arguments); } A.prototype = Object.create(B.prototype); let a = new A(); console.log(a);