I set a value inside of a function in AddEventListener then I tried to console log it outside of the function but it is not working. Please click this link https://jsfiddle.net/jQing/s1ykunqb/10 to see my script.
When you click on any of the text on the screen, the outerHTML of element associated with the clicked text is supposed to be logged. Everything works if and only if console log is executed inside of AddEventListener. However, I want to be able to access any value set inside of AddEventListener from outside.