I have two questions:
1. Can someone please explain to me the part in bold? What does it mean? I am struggling to get the logic. (I am completely new to coding in general, I have followed all steps up to this thoroughly to understand the structure, but wondering if everytime something is on the last line, it will always be returned??)
"Inside your method, add a line that calls .sort! on the arr array. Since it is the last line of the method, the sorted array will be returned."

  1. Why do I get this approved, when clearly the numbers are not printed to the console?

Replace this line with your code.


Pay attention to the second set of instructions.
It wants you to create the numbers array AFTER your method.

your alphabetize method should look like this

def alphabetize(arr, rev=false)

Create your numbers array after that, then call your alphabetize method on your numbers array.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.