Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 384 Bytes

File metadata and controls

18 lines (11 loc) · 384 Bytes

Lesson 28: Iterating arrays

for, for…of, forEach, and the functional methods.

What you'll learn

  • for when you need the index or want to break
  • for…of for clean value iteration
  • forEach runs a callback (can't break)
  • map/filter/reduce for transformations

Example

See examples/.

Exercise

Sum only the even numbers in an array two different ways.