Ruby - Enumerable and Collection Processing
Which of the following is the correct syntax to filter odd numbers from an array
arr using select?arr using select?select method requires a block with a block variable to test each element.{ |x| x % 2 == 1 } to filter odd numbers. Other options have syntax errors or missing block variables.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions