text: const form = document.querySelector(".login-form");
  
  form.addEventListener("submit", onFormSubmit);
  
  function onFormSubmit(event) {
    event.preventDefault();
  
    const formElements = event.currentTarget.elements;
  
    const email = formElements.email.value;
    const password = formElements.password.value;
  
    if (email === "" || password === "") {
      return alert("You have not filled in all the fields");
    }
  
    const formData = { email, password };
  
    console.log(formData);
    event.currentTarget.reset();
  
    //   const formData = new FormData(event.currentTarget);
  
    //   formData.forEach((value, name) => {
    //     console.log("name", name);
    //     console.log("value", value);
    //   });
  }
  