Rotating Link Button?

Hello,
I would like to create a button that points to 1 of 6 different webpages each time it is clicked. For example, Visitor 1 clicks on the button and it goes to Website A;
Visitor 2 clicks on the same button and it goes to Website B, etc.
Once it reaches the end of the list of 6, it starts over.

So it’s a ROTATING list, rather than a random list. I’ve found code for a random list, but need rotating. Can you help me?

Thank you so much for your wisdom!

Maureen

Below is the code that I am currently using which RANDOMLY SELECTS the link the visitor is sent to on click. Is it possible to ROTATE between the sites instead, when the button is clicked?

const allUrls = [
https://health.uforiascience.com’,
https://drpaige.uforiascience.com’,
https://doctord.uforiascience.com’,
https://thecodeofyou.uforiascience.com’,
https://health.uforiascience.com’,
https://wellspan.uforiascience.com’,
https://getz.uforiascience.com’,
https://drtom.uforiascience.com’,
https://uniquelyme.uforiascience.com
];

$w.onReady( function (){
const randomIndex = Math.floor(Math.random() * (allUrls.length - 1));
$w(‘#button9’).link = allUrls[randomIndex];
});


The site: https://www.livewelldna.com