标签:sync rom console UNC fun 操作 wait ISE test
function Gen (time) { return new Promise((resolve,reject) => { setTimeout(function () { resolve(time) },time) }) } async function test () { let arr = [Gen(2000),Gen(100),Gen(3000)] for await (let item of arr) { console.log(Date.now(),item) } } test()
标签:sync rom console UNC fun 操作 wait ISE test
原文地址:https://www.cnblogs.com/qjb2404/p/12231570.html