You can use
addEventListener to listen for events and interactions in an element.
Polyfills and How to Use Them
- Keep your code DRY. Meaning Don’t Repeat Yourself. Learn how to abstract code.