A Beginner’s Guide to JavaScript Event Delegation

Event delegation is often a great way to start refactoring novice JavaScript code. This allows you to place a single EventListener on a parent element that does the work of a few, or dozens, or even hundreds of EventListeners. It makes code so DRY you might as well move to Moab and start a sandpaper business.