<button id="boton">Haga clic</button>
<script>
    var boton = document.querySelector('#boton');
    function botonHandler() {
        alert('Hicieron clic en el Botón');
    }
    boton.addEventListener('click', botonHandler); // Aqui estaba el error, botonHandler().
</script> 
            