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 odds_n_ends.select 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.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?