JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" onclick="openTwoWindowTab();">Click Here</a>
JavaScript
function openTwoWindowTab() {
// create object to serve the urls
var obj = {
0: 'http://www.google.com',
1: 'http://www.yahoo.com'
};
setTimeout(function () { // use setTimeout function to wait for other window to open
// otherwise one window will be opened in the browser window
for (var a = 0; a <= Object.keys(obj).length - 1; a++) {
window.open(obj[a], '_blank');
}
}, 1000);
}