- A PROGRAMMER'S BEST FRIEND
# Ruby knows what you # mean, even if you # want to do math on # an entire Array cities = %w[ London Oslo Paris Amsterdam Berlin ] visited = %w[Berlin Oslo] puts "I still need " + "to visit the " + "following cities:", cities - visited
def one_plus_one 1 + 1 end
parenthesis are optional
self - self is the default receiver.
my_object.my_method #or self.my_method