# Looping Through an Array

Visit every item of an array with a for loop, a for...of loop or forEach, and use a loop to add up or count things, such as a playlist's total play time.

![Cheat sheet: Looping Through an Array](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/d46a31a3898f465fac21b2e93d4e5b05.webp)

- Category: JavaScript
- Level: Apprentice
- Tags: Callback Function, for Loop (javascript), for...of Loop, forEach(), JavaScript
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-arrays-looping-cheat-sheet
