ABSTRACT

Ruby variables are memory locations that hold data to be used in the programs. Naturally, Ruby is a part of the family of dynamic languages. Unlike strongly typed languages like Java, C, or Pascal, dynamic languages. Assignment to uninitialized local variables also serves as variable declaration. The variables start to exist until the end of the current scope is reached. The lifetime of local variables is determined when Ruby parses the program. Constants start with an uppercase letter. Constants determined within a class or module can be accessed from within that class or module, and those defined outside a class or module can be accessed globally. Iteration means doing one thing multiple times like a loop. Thus, Iterators could be defined as methods supported by collections, where the collection stands for the random objects that store the sets of data members.