const loginForm = document.getElementById("login-form");
loginForm.addEventListener("submit", handleSubmit);
function handleSubmit(e) {
e.preventDefault();
const formData = new FormData(e.target);
const formProps = Object.fromEntries(formData);
}
var formData = new FormData();
fromData.append('name','value');
var form = $('form')[0]; // You need to use standard javascript object here
const oData = new FormData(form);
console.log(oData);
var formData = new FormData();
const formData = new FormData([form]);