I'm having an issue making a "random" link open up in a new tab.
var randomLink = function(){
var links = [
'youtube.com/channel/UCkq10sWOK1ftebGZPFJBekA',
'soundcloud.com/iamcardib',
'soundcloud.com/rickybobby-slumpgod',
'soundcloud.com/wavey-hefner',
'soundcloud.com/liluzivert',
'soundcloud.com/flameemojimusic',
'soundcloud.com/youngthugworld',
'soundcloud.com/kodak-black'
];
var max = (links.length)
window.open=links[Math.floor(Math.random()*max]
var link = links[randomNumber];
window.location = "http://" + link;
};
I've multiple times to get the links to open up in a new tab when I click a button but it will only open in the same tab.