`; // Insert the HTML inside the div adDiv.innerHTML = adHTML; // Append the ad slot to the container container.appendChild(adDiv); } // Move to the next set of ads for the next cycle currentSlotIndex = (currentSlotIndex + 1) % adSlots.length; } // Initial ad load updateAds(); // Update ads every 10 seconds setInterval(updateAds, 10000);