// Iterate through each checked checkbox
checkedBoxes.forEach((checkbox, index) => {
// Use setTimeout to add a delay between clicks
setTimeout(() => {
// Click the checkbox
checkbox.click();
// If this is the last checkbox, call the function again after 2 seconds
if (index === checkedBoxes.length - 1) {
setTimeout(clickTickedCheckboxes, 2000);
}
}, index * 2000); // 2000ms (2 seconds) delay between each click
});
}