How to make a simple inventory?!? Beginner coder JS

Hello all,

I am very new to Unity and coding. I want to make a simple inventory where a user clicks a item and it shows up in the inventory.

Right now I have a menu bar on the bottom of the screen that has different buttons the user can click. One of the buttons is for the inventory and when clicked on a box pops up with a grid of buttons on it.

During game play the user will be able to pick up a key and different bottles. For them to pick it up they have to press ‘e’.

So my logic is to:

Make a array of items;
      if the users presses 'e'{
               call destroy item;
               load up 2d image of item on one of the buttons on the grid for inventory;}

Please help!!!

Hey I posted the same question, Ill post the reply in here if it helps you