Edit in JSRun

function A(x){
  console.log('A', x)
}

function B(x){
  console.log('B', x)
}

B.prototype = new A()
// B.prototype.constructor = B

new B('ui')
new B('xx')

console.log(new B('xx1').constructor)