const popup = document.querySelectorAll('.popup');
let counter = 0;
setInterval(function() {
popup[counter].classList.remove('show');
counter++;
counter === popup.length ? counter = 0 : console.log('¯\\_(ツ)_/¯')
popup[counter].classList.add('show');
}, 1000)