Q:

ajax function not working after adding async and await keywords

Below mentioned code is working fine.
$.ajax({
   url: '?module=abc&action=xyz',
   //Ajax events
   beforeSend: function (e) {
     //
   },
   success: function (e) {
       const URL1 = '?module=mno&action=pqr';
        fetch(URL1);
   },
   error: function (e) {
     alert('error ' + e.message);
   },
   // Form data
   data: formData,
   type: 'POST',
   //Options to tell jQuery not to process data or worry about content-type.
   cache: false,
   contentType: false,
   processData: false
});

But if I add async and await it doesn't work and also doesn't give any error in console. Like below code:
$.ajax({
   url: '?module=abc&action=xyz',
   //Ajax events
   beforeSend: function (e) {
     //
   },
   success: async function (e) {
       const URL1 = '?module=mno&action=pqr';
        const RES = await fetch(URL1);
        let output = await RES.json();
   },
   error: function (e) {
     alert('error ' + e.message);
   },
   // Form data
   data: formData,
   type: 'POST',
   //Options to tell jQuery not to process data or worry about content-type.
   cache: false,
   contentType: false,
   processData: false
});

Don't know where I am going wrong.

A:

Ok, got it, I just removed the code from inside success and add a new function and it worked.
$.ajax({
   url: '?module=abc&action=xyz',
   //Ajax events
   beforeSend: function (e) {
     //
   },
   success: async function (e) {
       //I added the below 'runquery()' function.
       runquery();
   },
   error: function (e) {
     alert('error ' + e.message);
   },
   // Form data
   data: formData,
   type: 'POST',
   //Options to tell jQuery not to process data or worry about content-type.
   cache: false,
   contentType: false,
   processData: false
});

And then added a new function
async function runquery() {   
    const URL1 = '?module=mno&action=pqr';
    const RES = await fetch(URL1);
    let output = await RES.json();
 }

