Nearby lessons

21 of 40

📋 JavaScript for...of Loop

📌 What is JavaScript for...of Loop?

The for...of loop iterates over iterable objects (arrays, strings, etc).

Modern way to iterate collections.

📋 for...of Basics

AttributeDescription
Syntaxfor (value of iterable)
Works WithArrays, Strings, Maps, Sets
BenefitsClean syntax, works with iterables
Code Example
PREVIEW READY
Loading Editor...
Live Preview

🧠 Test Your Knowledge

2 Questions

Progress: 0 / 2
Keep Going!JS - For Each Loop