Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the use of global variable $ in Ruby?



Explain the use of global variable $ in Ruby?..

Answer / Robinder Singh Goyath

$ variables, also known as global variables, are used to store values accessible across all scopes within a Ruby program. They can be accessed without an explicit qualifier, making them easier to access but potentially leading to unintended conflicts and errors. It's generally recommended to avoid using global variables unless necessary.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Explain the difference in scope for these two variables: @@name and @name?

1 Answers  


Explain Ruby exceptions?

1 Answers  


Mention what is the difference between procs and blocks?

1 Answers  


What are the ruby variables?

1 Answers  


Can you call a private method outside a ruby class using its object?

1 Answers  


Explain about normal method class?

1 Answers  


what is the syntax for Ruby collect Iterator?

1 Answers  


What is mvc and why do we use it?

1 Answers  


Is ruby a dying language?

1 Answers  


How ruby looks up a method to invoke?

1 Answers  


Explain retry statement in ruby.

1 Answers  


what is a class library in Ruby?

1 Answers  


Categories