I have a form with submit button. following code is js code for this form: (note: I Know javascript Anonimous function but it is little bit diffrent types of form submit) Please explain how this Anonimous fucntion work
Post = form => {
$.ajax({
type: 'POST',
url: form.action,
data: new FormData(form),
contentType: false,
processData: false,
success: function (res) {}
});
here, what is post = form =>
mean? what this kind of code is called in javascript?( Is it method or event call or anything else?)
I think this is anonymous functions in JS. but how does event is fire when I click on submit button.