4/6 Ordering your Library - is this a typo?


#1



https://www.codecademy.com/courses/ruby-beginner-en-nOho7/0/4?curriculum_id=5059f8619189a5000201fbcb


My code works. I have a question about the instructions:
Instructions
1. 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.
2. Now test your work! After your method, make a new array called numbers that contains a few numbers like the example above.
3. Call your alphabetize method with your numbers array as the parameter and puts the result to the console.

Shouldn't it be Call your alphabetize method with your numbers array as the argument instead? From what I understand:

def foo (param1, param2) <- parameter
end

foo (arg1, arg2) <- argument


def alphabetize(arr, rev=false)
    arr.sort!
end

numbers = [2,6,8,4]

puts alphabetize(numbers)


#2

argument and parameter are nearly synonymous. The parameter is the variable that holds the argument.


#3

A post was split to a new topic: Alphabetize problem


#6