var A = function() {
    this.location = "world";
};
var C = function(){
   this.sayHello = function() {
        console.log("hello " + this.location)
    }
}
C.prototype = {
    showUpAndLeave : function() {
        this.sayHello();
        console.log("goodbye " + this.location); 
    }
};
A.prototype = Object.create(new C());

var me = new A();
me.showUpAndLeave();

console.log(me.prototype)