第二种写法
const arr=[1,2,3,4,5,6]
arr.reduce(async (prs, cur, idx) => {
const t = await prs
const time = idx === 0 ? 0 : 1000 + (idx - 1) * 500
return new Promise((res) => {
setTimeout(() => {
console.log(cur)
res(time)
}, time)
})
}, Promise.resolve(0))