Adding onClick event to multiple elements

Thank you so much for taking the time to advise on this @bwprado . Whilst I don’t (yet) completely understand your suggested code, I certainly get the gist of it. I’ve tried running the revised code and am still getting the same TypeError: icon.onClick is not a function that I got with my code. When I hover over the onClick line in the editor, it tells me that property “onClick” does not exist on type “string” .
Any thoughts?