JSFiddle - React, Tailwind, and code Playground

JavaScript

function A( x, y ) {
    this.x = x;
    this.y = y;
}
A.prototype.run = function () { return 'running'; };

function B( x, y ) {
    return Object.create( new A( x, y ) );
}

var b = new B( 1, 2 );

document.write( b.x );
document.write( b.y );
document.write( b.run() );