I don't get it

I’m confused about how to make an inventory system. I know how to make an overlap but I don’t get how to make a save for it. (Javascript help).