Ruby Methods (Part 2)

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.
Tutorial Difficulty Level    

Here’s another use of methods. Notice that when we send an array as a parameter, changes in the function do update the value to the caller.

One incidental thing we have not seen before is parallel assignment in the shuffle function which exchanges two values.