jsObjectsPractice.js
// Constructor for a battleMech, functionally similar but the object literal is simpler 

Constructor for a battleMech, functionally similar but the object literal is simpler
Constructor for a battleMech functionally similar but the object literal is simpler
function Battlemech(mechName,armorClass,frontHeadArmor,frontArmArmorL,frontArmArmorR,frontTorsoArmor,frontLegArmorL,frontLegArmorR,
    rearHeadArmor,rearArmArmorL,rearArmArmorR,rearTorsoArmor,rearLegArmorL,rearLegArmorR,internalHead,internalArmL,internalArmR,
    internalTorso,internalLegL,internalLegR){
        this.mechName = mechName;
        this.armorClass = armorClass;
        this.frontHeadArmor = frontHeadArmor;
        this.frontArmArmorL = frontArmArmorL;
        this.frontArmArmorR = frontArmArmorR;
        this.frontTorsoArmor = frontTorsoArmor;
        this.frontLegArmorL = frontLegArmorL;
        this.frontLegArmorR = frontLegArmorR;
        this.rearHeadArmor = rearHeadArmor;
        this.rearArmArmorL = rearArmArmorL;
        this.rearArmArmorR = rearArmArmorR;
        this.rearTorsoArmor = rearTorsoArmor;
        this.rearLegArmorL = rearLegArmorL;
        this.rearLegArmorR = rearLegArmorR;
        this.internalHead = internalHead;
        this.internalArmL = internalArmL;
        this.internalArmR = internalArmR;
        this.internalTorso = internalTorso;
        this.internalLegL = internalLegL;
        this.internalLegR = internalLegR;
}
function Battlemech ( mechName , armorClass , frontHeadArmor , frontArmArmorL , frontArmArmorR , frontTorsoArmor , frontLegArmorL , frontLegArmorR , rearHeadArmor , rearArmArmorL , rearArmArmorR , rearTorsoArmor , rearLegArmorL , rearLegArmorR , internalHead , internalArmL , internalArmR , internalTorso , internalLegL , internalLegR ) { this . mechName = mechName ; this . armorClass = armorClass ; this . frontHeadArmor = frontHeadArmor ; this . frontArmArmorL = frontArmArmorL ; this . frontArmArmorR = frontArmArmorR ; this . frontTorsoArmor = frontTorsoArmor ; this . frontLegArmorL = frontLegArmorL ; this . frontLegArmorR = frontLegArmorR ; this . rearHeadArmor = rearHeadArmor ; this . rearArmArmorL = rearArmArmorL ; this . rearArmArmorR = rearArmArmorR ; this . rearTorsoArmor = rearTorsoArmor ; this . rearLegArmorL = rearLegArmorL ; this . rearLegArmorR = rearLegArmorR ; this . internalHead = internalHead ; this . internalArmL = internalArmL ; this . internalArmR = internalArmR ; this . internalTorso = internalTorso ; this . internalLegL = internalLegL ; this . internalLegR = internalLegR ; }
Constructor for a battleMech, functionally similar but the object literal is simpler
Constructor for a battleMech functionally similar but the object literal is simpler