Ruby - Enumerable and Collection Processing
Identify the problem in this Ruby code snippet:
arr = [5, 10, 15]
puts arr.any? { |x| x > 20 }arr = [5, 10, 15]
puts arr.any? { |x| x > 20 }any? method accepts a block and the syntax is correct.any? returns false and prints it.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions