# for Loop

*noun*

say it: **“FOR loop”** **/fɔːr luːp/**

A JavaScript loop with a counter: it sets the counter, checks a condition before each round, and updates the counter after each round, often to visit an array's items by index.

## What is **for Loop** in JavaScript?

**for Loop** — Repeats code once for each item in a collection.

```javascript
for (let day = 0; day < 3; day++) {
    scheduled[day] = true;
}
```

## In a sentence

- “My **for loop** printed table numbers 1 to 10 for the cafe's seating chart.”
- “My **for loop** counted from 0 up to the playlist's length and printed each song with its number.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

## In other subjects

- [for Loop in C#](https://www.ask-codey.com/glossary/for-loop-c-sharp)
- [for Loop in Java](https://www.ask-codey.com/glossary/for-loop-java)
- [for Loop in PowerShell](https://www.ask-codey.com/glossary/for-loop-powershell)
- [for Loop in Python](https://www.ask-codey.com/glossary/for-loop)
- [for Loop in Unix](https://www.ask-codey.com/glossary/for-loop-unix)

Source: https://www.ask-codey.com/glossary/for-loop-javascript
