<div class="container">
  <button>
    Olá pessoas!
  </button>
</div>
        document.querySelector('.container').addEventListener('click', function (event) {
            console.log('Container clicado:');
            console.log('event.target:', event.target);
            console.log('event.currentTarget:', event.currentTarget);
        });

        document.querySelector('button').addEventListener('click', function (event) {
            console.log('Botão clicado:');
            console.log('event.target:', event.target);
            console.log('event.currentTarget:', event.currentTarget);
        });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.