Loops can contain other loops:
for (let i = 1; i <= 3; i++) {
for (let j = 1; j <= 3; j++) {
console.log(i, j)
}
}
// Prints: 1 1, 1 2, 1 3, 2 1, 2 2, 2 3, 3 1, 3 2, 3 3
The inner loop completes fully for each iteration of the outer loop. With outer and inner iterations, you get total iterations.