UPDATED VERSION
This code snippet demonstrates the concept of prototypal inheritance in JavaScript. In "File 1", a constructor called Dummy is created with some properties. Then, in "File 2", these properties are inherited by a new constructor named BConstructor as shown below:
// File 1
var Dummy = function () { /* A */}; // Dummy needs to be able to refer globally
Dummy.prototype.methodA = function () {alert(this.constructor);};
// File 2
var BConstructor = function () { /* B */};
BConstructor.prototype = new Dummy(); // Include properties of Dummy too
BConstructor.prototype.methodB = function () {alert(this.constructor);};// Create more properties if needed
BConstructor.prototype.constructor = BConstructor; // Make sure BConstructor will be the constructor of future-created objects
var a = new BConstructor();
a.methodA();
a.methodB();