Skip to Content
Blocks, Procs, and Lambdas
Been Around the Block a Few Times

You’re basically a Ruby block master at this point. This should be pretty easy!



The odds_n_ends array is full of all sorts of objects, but we only want the integers (numbers without decimal bits).

Create a new variable, ints, and store the result of calling method with a block that checks if the element .is_a? Integer.

puts ints at the end of the file in order to see the final contents of the array.

Folder Icon

Take this course for free

Already have an account?