Variables (2)

Ruby has 5 types of variables

  1. Local Variables
  2. Global Variables
  3. Instance Variables
  4. Constants
  5. Class Variables

Now a little example of each.

Local Variable

Global Variable

Instance Variable


Class Variable

Quick mass Assignments

Declare and assign values to variables faster






Copyright 2017. All rights reserved.

Posted January 8, 2017 by Edmundo in category "Ruby