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

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/ruby-beginner-en-nOho7/0/4?curriculum_id=5059f8619189a5000201fbcb

<In what way does your code behave incorrectly? Include ALL error messages.>
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)

<do not remove the three backticks above>

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

1 Like

A post was split to a new topic: Alphabetize problem