📌  相关文章
📜  在 javascript foreach 循环中添加延迟 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:30.700000             🧑  作者: Mango

代码示例1
// tasks is your array
tasks.forEach((element,i) => {
                setTimeout(
                    function(){
                         //the work you want to perform   
                    }
                , i * 300);
});