JS Asynchronous queue

has three execution functions. How to execute functions through an asynchronous queue so that they can be output in the order of parameters?
function f1() {
  setTimeout(function() {
    console.log("f1")
  }, 300)
}

function f2() {
  setTimeout(function() {
    console.log("f2")
  }, 100)
}

function f3() {
  setTimeout(function() {
    console.log("f3")
  }, 200)
}

function doWork(list) {
    // TODO
}

doWork([f1, f2, f3])

// : f1 f2 f3
May.29,2022

function f1() {
              return new Promise(function (resolve, reject) {
                setTimeout(function () {
                      resolve('f1');
                }, 300);
              });
        };
        // b
        function f2(data) {
              return new Promise(function (resolve, reject) {
                setTimeout(function () {
                     resolve(data + 'f2');
                }, 100);
              });
        };
        // c
        function f3 (data) {
              return new Promise(function (resolve, reject) {
                setTimeout(function () {
                      resolve(data + 'f3');
                }, 200);
              });
        };
        f1().then(function (data) {
            return f2(data);
        }).then(function (data) {
            return f3(data);
        }).then(function (data) {
            console.log(data);// abc
        });


function enque() {
   setTimeout(function() {
     f1();
   }, 0);
   setTimeout(function() {
     f2();
   }, 400);
   setTimeout(function() {
     f3();
   }, 500)
}

stupid method, ha

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44a87-44acf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44a87-44acf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?