[ad_1]
You can use reduce to achieve what you want this way:
[1, 5, 1].reduce(function(p, c, i) {
setTimeout(function() {
document.write(`element: ${c} <br>`);
}, (p + c) * 1000);
return p + c;
}, 0);1
[ad_2]
solved An array with integers (seconds) and setTimeout()