subMenuEl’s event listener should update the contents of mainEl to the contents of the <a> element, within an <h1>, clicked within subMenuEl.
const subMenuEl = document.querySelector("#sub-menu")
const mainEl = document.querySelector("#main")
subMenuEl.addEventListener("click", function(event) {
const h1El = document.createElement("h1")
h1El.innerHTML = event.target.innerHTML
mainEl.innerHTML = ""
mainEl.appendChild(h1El)
})