(function randomPopup() { const min = 1000; const max = 10000; popupMessage(); setTimeout(randomPopup, Math.floor(Math.random() * (max - min) + min)) }());