Pixel shows you how to store variables in the local store. Wich is fine. There are tutorials enough about how to use the Local Storage. And frankly, this is very easy to learn. And you will when you are ready for that.
Just consider that the gamelogic in the given example needs only 1 variable to make the choosen weapens work. The variable 'BulletPower'. You can not choose a gun during play, the player is not holding sprites that represent a gun, there are not squads that have to be made, equiped, ... etc.
Looking at the grafical representation of your inventory, you have bigger plans. Looking at the code, you are just filling a inventory, without building a database that can actual be used later in the gameplay.
The arrays, you should use, have not as main function to fill up the inventory. They are essential in the actual gameplay. In fact, the inventory is just and no more then a grafical representation of the actors in the game.
They just happen to be easy to get stored in the Local Storage.