Utilizor
Contact Us

Nested Loops

Loops inside loops.

Nested Loops

A loop can be nested inside another loop.

The inner loop will be executed one time for each iteration of the outer loop.

Example

for (let i = 0; i < 3; i++) {
  for (let j = 0; j < 3; j++) {
    console.log(i, j);
  }
}