Loops let one piece of logic visit every value in an array. A for...of loop focuses directly on the items, which makes it a readable choice for totals, counts, and searches.
const scores = [8, 10, 7];
let total = 0;
for (const score of scores) {
total += score;
}
console.log(total); // 25The first exercises inspect each item, accumulate results, count matches, and build new arrays manually. Seeing the steps explicitly prepares you to understand the array methods that automate these patterns later.