Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Alphonse Cuccurullo2,513 Points
Can someone help me?
After your .sort! call, add an if statement. If rev is true, call reverse! on arr. Keep your numbers array and the puts statement so that you can see your work in action
def alphabetize(arr, rev=false)
if rev == true
numbers = [1,4,5,6,7,8,55]
Its telling me this " It looks like your method doesn't default to alphabetizing an array when it doesn't receive a second parameter."