How Do You Make Clickable Divs?

How? I could understand if this occurred after I press the enter button because of the line of code after that which says to delete everything and then get the newly created divs again, but what about when I freshly load the page? The event listeners should be there, but the divs are never clickable (that is, I never get the console message after I click them).