17/21

My code doesn’t seem to be working to create a new variable to store the results of the integers of the array “odds_n_ends”. It tells me ints isn’t an array, and it should be. Am I being really silly? Can NOT see where to amend.

Oh god, just seen now that I didn’t put an s on the end of odd. Clearly need to have a break! Apologies for bothering.

1 Like

your code should be
ints= odds_n_ends.select {|a| a.is_a? Integer}

I did the exact same thing, thank you for pointing it out.

1 Like

Oh man, I did the same thing… Thanks for posting! =P

It should be
ints = odds_n_ends.select { |x| x.is_a? Integer }
not
ints = odds_n_ends.select {|x| x.is_a? Integer}
You need to remove the spaces

1 Like

haha I’m now the 4th person who did the same thing, thanks!

Is this exercise cursed or are we all just tired after staring at code for hours on end? Cause I’m the 5th! :laughing: