I have the same problem than you, I can pass the lesson but nothing in the console!!
if anyone can help that would be great in order to understant what’really wrong in the code!
Its just your syntax error,but logic is right You call ".each" method for my_array.Example:my_array.each Then you tell ".each" method what to do: for each |x| you puts this value.Example: {|x| puts x}.It prints all values,but we need the even values. Thats why we add if condition: {|x| puts x if x%2==0 },what tell us print our value if it divisible by 2.
P.S.
This is my code
my_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
my_array.each {|x| puts x if x%2==0 }
@abergeron, The solution from @devslayer48819 was the solution I found to be the correct solution to my inquiry. It was also mimicked by @codecoder49931. His solution was the same but confirmed what was known. I’m not sure if your post was supposed to be a question, however if it was I hope that I answered it for you.