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');
// return data in key value pair
$('#form').serializeArray().reduce(function(obj, item) {
obj[item.name] = item.value;
return obj;
}, {});
var formData = new FormData();
const formData = new FormData([form]);