Click to go to a random site var links = [ “google.com”, “youtube.com”, “reddit.com”, “apple.com”] var openSite = function() { // get a random number between 0 and the number of links var randIdx = Math.random() * links.length; // round it, so it can be used as array index randIdx = parseInt(randIdx, 10); // construct…