adding delay in javascript foreach loop
// tasks is your array
tasks.forEach((element,i) => {
setTimeout(
function(){
//the work you want to perform
}
, i * 300);
});
Are there any code examples left?
New code examples in category Javascript