Ruby - Arrays
Why does calling
flatten on an array not change the original array in Ruby?flatten on an array not change the original array in Ruby?flatten method returns a new array with nested arrays merged but does not change the original array.flatten! modifies the original array, but flatten returns a new one.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions