function A() {
    this.name = "a";    
}
function B() {
var k,value;
for( k in this){
value = this[k];
if(typeof value == 'string'){
this[k]=value;
}
}
    this.age = 30;    
}
B.prototype = new A();
 
var $b1 = new B();
var $b2 = new B();