Iterating Over Collections
Use each, map, select, and other iteration methods to process collections effectively.
1
Iterating Over Collections
Iteration allows you to process each element in an array or hash.
In this lesson, you will learn how to use methods like each, map, and select.

2
Using Each with Arrays
The each method loops through each element in an array.
[1, 2, 3].each { |num| puts num * 2 }All lessons in this course
- Arrays and Hashes
- Iterating Over Collections
- Useful Array and Hash Methods