// Select only the first 50 unchecked checkboxes on the page let checkboxes = document.querySelectorAll('input[type="checkbox"]'); …