How is the scope of variables used in Event Handlers determined? (when do I have to assign variables to fetch via event.currentTarget and when not???)
Working on my card game project I noticed at some point that I needed to append values I want to use inside an addEventListener’s function, to the tag that becomes available inside the function as event.currentTarget… but that in seemingly exactly similar coding situations, just calling variables declared outside the Event Handler’s function works.