Is there a way to create a function that continuously changes the background color every 15 seconds by picking colors from an array that starts over once all colors have been used, without having the function run just one time?
$(document).ready(() => {
const colors = ['#83ACDE','#EDCA38','#A1B2C3','#3C2B1A'];
let index = 0;
setInterval(() => {
$('body').css("backgroundColor", colors[index]);
index = (index + 1) % colors.length;
}, 15000);
});