// ⭐️ traditional for-loop
for (let i = 0; i < nodeList.length; i++) {
let node = nodeList[i];
}
// ⭐️ for-of loop
const list = document.querySelectorAll('input[type=checkbox]');
for (let checkbox of list) {
checkbox.checked = true;
}
// ⭐️ for browsers which don't support NodeList.forEach()
Array.prototype.forEach.call(list, (checkbox) => {
checkbox.checked = true;
});