How to add EventListener to a variable?

How can I add event listener to a variable?