Ruby Methods (Part 1)

Tutorial Difficulty Level    

Functions (and later methods) are defined with def. Parameters are given, without types of course. Default values may be provided. Note that when we send an integer, the method does not change the value sent.