Event delegation

Hello,
I have a question. I have a list

Ul
  Li
  Li
  Li
Ul

I add new class on click to Li elements with the help of event delegation. So I have one event listener on Ul element.
The problem is that I want Li elements with a new class to be added to a new array but when I push them inside an array it is written as an underfied so I have an array or eventually object of the undefined element. My question is how to write those Li with a new class to be able to manipulate on them.

Sorry for not posting code. I don’t have access to it now. I will add it later but if anyone can help me now I would appreciate that.

Can you share the code you have as far?