Ruby Ruby Blocks Working With Blocks Block Method Practice: Arrays

Ruby Blocks

In this challenge what are they looking for?

array_blocks.rb
array = ["Tree", "House"]
array.select { |item| items > "4" }

1 Answer

Luke Fritz
Luke Fritz
10,255 Points

See this answer.

To copy from that answer...

    array = ["Tree", "House"]
    house = array.select {|item| item.length > 4 }