Remember "map" and "collect"? Ruby did it again.
"select" and "filter" do exactly the same thing. They pick the items that fit some condition, from a list.
numbers = [0, 4, 2, 3, 9, 8] numbers.select {|n| n.odd? } #=> [3, 9] numbers.filter {|n| n.odd? } #=> [3, 9]
There's more than one way, remember?
See you next time!