How do I know which member of an array I have from a tap event

I have a “wood” array that has fifty slots.  Each one has a wood image in it.  When the player taps on the wood a tap listener activates my deleteWood function.  How do I know which wood they tapped when I am in the function?

Thanks!

You can define a .id to the object when creating it and then retrieve it when tapped with event.target.id.

You can define a .id to the object when creating it and then retrieve it when tapped with event.target.id.