Learn
Methods, Blocks, & Sorting

Basic Methods

Let's quickly review how to create a basic Ruby method.

def double(n)
  return n * 2
end

The example above is just a syntax reminder.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.