Ruby - Arrays
What does the Ruby method compact do when called on an array?
What does the Ruby method compact do when called on an array?
compactcompact method creates a new array by removing all nil values from the original array.compact removes nil values without modifying the original array.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions