Hello!
const input = document.getElementById("user-input");
const checkBtn = document.getElementById("check-btn");
const clearBtn = document.getElementById("clear-btn")
checkBtn.addEventListener("click", () => {
if (input.value === "") {
alert("Please provide a phone number")
}
});
There seems to be no reaction here. Console throws a [TypeError: alertMessage is undefined], same story if i put return before alert.
Any ideas what I’m missing here? Thanks