Ruby - Enumerable and Collection Processing
Which Ruby code snippet correctly uses
reject to remove all odd numbers from an array numbers?reject to remove all odd numbers from an array numbers?n.odd? is true, correctly removing odd numbers.reject(&:even?), which removes even numbers.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions