Le falto el ´;´
<button onclick="alertFunction();">Haz clic aquí</button>
function alertFunction() {
alert("¡Hola, has hecho clic en el botón!");
}
Le falto el ´;´
<button onclick="alertFunction();">Haz clic aquí</button>
function alertFunction() {
alert("¡Hola, has hecho clic en el botón!");
}