I need help on Classes and Arrays for inventory.

So i am trying to make an inventory system but i have no idea where to begin. Im not new at coding but iv never used classes and arrays before so i am not sure which one i should use for an inventory. Should i use classes or arrays? Thanks i am using javascript.

Lockstep makes a good point; keeping with his analogy, you should definitely learn how the steering works! :slight_smile:

But what you need to realize is that an Array is just a collection of objects. Ints are objects, floats, GameObjects, Transforms, and Components are all objects. So are your own Classes. So what you need to figure out is what you want to keep a list of. You’re probably going to need one, but whether you keep references to the GameObjects or some InventoryItem class that you create is something you’re going to have to figure out.

Feel free to ask some more questions about that, in a new question, of course.