Is the function synchronous or asynchronous?

let production = () => {
  setTimeout(() => {
    console.log("production has started");

    setTimeout(() => {
      console.log("the fruit has been chopped");

      setTimeout(() => {
        console.log(`${stocks.liquid[0]} and ${stocks.liquid[0]} was added`);

        setTimeout(() => {
          console.log(`icescream was placed on ${stocks.holder[0]}`);

          setTimeout(() => {
            console.log(`icescream was placed on ${stocks.holder[0]}`);

            setTimeout(() => {
              console.log(`${stocks.toppings[0]} was added as toppings`);

              setTimeout(() => {
                console.log("Serve icescream");
              }, 3000);
            }, 3000);
          }, 2000);
        }, 1000);
      }, 1000);
    }, 2000);
  }, 0000);
};

order(0, production);

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.