this.unequip = function(what){ var theitem = all_equipment_ever[what]; //Get the item var itemindex = this.equipment.indexOf(theitem); //Get the numerical position of the item in the array this.equipment.splice(itemindex, 1); //Remove the item from the array}
this.equipment.splice(itemindex, 1); //Remove the item from the array