JSFiddle - React, Tailwind, and code Playground
JavaScript
var otherStoryLinksArray = ['http://google.com', 'http://www.yahoo.com', 'http://gmail.com'];
function work() {
if(otherStoryLinksArray.length==0) return;
var url = otherStoryLinksArray.shift();
var openWindow = window.open(url);
setTimeout(function () {
openWindow.close();
work();
}, 3000);
}
work();