async function process(array) { for await (let i of array) { setTimeout(function(){console.log(i);},i*1000); } } process([6,3,4,9,1]) //输出结果: // 1 // 3 // 4 // 6 // 9 来源:https://www.cnblogs.com/shurun/p/11939880.html 标签 await