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.

Instructions

1.

Create a method, welcome, that puts “Welcome to Ruby!” After defining your method, call it.

Folder Icon

Take this course for free

Already have an account?