← CodePrimer
JavaScript Beginner Basics

for...of over an array

How do I loop array values cleanly?

for...of.

Sample
const skills = ['HTML', 'CSS', 'JS'];
for (const skill of skills) {
  console.log(skill);
}

Notes

for...in is for object keys — usually avoid for arrays.

Keywords: for of · array · loop

Related

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share