For a assignment at CodeAcademy I have the this script.
def alphabetize(arr, rev=false) arr.sort! if rev == true arr.reverse! end puts arr end numbers = [ 5, 1,3,8] alphabetize(numbers, rev = true)
But now I see this error message :
Oops, try again. It looks like your method doesn't default to alphabetizing an array when it doesn't receive a second parameter.
Can anyone explain to me where I go wrong ?