// 借用其他对象的方法
var A = function( name ){
this.name = name;
};
var B = function(){
A.apply( this, arguments);
};
B.prototype.getName = function(){
return this.name;
}
var b = new B( 'sven' );
console.log(b.getName() ); // seven