How JavaScript Event Delegation Works

The base concept is fairly but many people don’t understand just how event delegation works. Let me explain the how event delegation works and provide pure JavaScript example of basic event delegation.