Global Variables : Global Variables « Language Basics « Ruby






Global Variables


Global variables are available globally to a program. 
Their scope is the whole program. 
Global Variables are prefixed by a dollar sign ($).

$amount = "0.00"

 








Related examples in the same category

1.define global variables by putting a dollar sign ($) in front of the variable name