SyntaxFix
Write A Post
Hire A Developer
Questions
array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
array.each { |x| puts x if x % 2 == 0 }
2 4 6 8 10