JS Object Inheritance - Poor namespacing

This is how the PageEditor is written as it is a very ancient code, written pre war :-)

by Ben Clayton

JavaScript

function infx_forms(){
    this.name='Bat';
    this.price={net:2,vatrate:'20%'};
    this.show=function(){
         console.log("product name is "+this.name+", price net "+this.price.net+ ", vat rate "+this.price.vatrate);   
    };
};


function luco_forms(){
    this.price={net:4};
    this.name='Ball';
};

luco_forms.prototype = new infx_forms;

var obj1 = new infx_forms();

var obj2 = new luco_forms();

obj1.show();
obj2.show();