Ruby - Methods
What will be the output of this Ruby code?
def merge_and_sort(*arrays) arrays.flatten.sort end p merge_and_sort([5, 3], [1, 4], [2])
def merge_and_sort(*arrays) arrays.flatten.sort end p merge_and_sort([5, 3], [1, 4], [2])
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions