Can you help me troubleshoot my code?
If the user's inputted birthday matches the JSON birthday, then a form will be displayed (I haven't included it here).
Otherwise, the form will not be displayed.
performBirthdayCheck: function() {
let userBirthday = moment(this.userBday).format("MM DD, YYYY"),
resultBirthday = moment(this.results.BIRT_D).format("MM DD, YYYY");
if (userBirthday === resultBirthday) {
alert("CORRECT");
window.onload = function() {
const btn = document.querySelector("#show-form");
const form = document.querySelector(".form");
const close = document.querySelector(".close-container");
btn.addEventListener("click", () => {
form.classList.add("form-show");
close.classList.add("x-show");
});
close.addEventListener("click", function() {
close.classList.remove("x-show");
form.classList.remove("form-show");
});
};
} else {
alert("WRONG");
window.stop();
}
}