function removeAlert(child){ const parentAlert = child.closest('.alert'); parentAlert.style.display = "none"; } document.removeAlert = removeAlert;