JSFiddle - React, Tailwind, and code Playground

by shriek

Babel + JSX

async function reduceShit() {
	const arr = [1,2,3];
  const x = await arr.reduce(async (acc, t) => {
    await setTimeout(() => {
      acc = {
        ...acc,
        [`${t}#`]: t
      };
    }, 200);
    return acc;
  }, {});
  return x;
}

const mm = reduceShit().then(x => console.log(x));
console.log(mm);