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...


what is the syntax for Ruby collect Iterator?



what is the syntax for Ruby collect Iterator?..

Answer / Sumit Singh Nayal

The syntax for Ruby's collect iterator is: array.collect { |element| block }. The block is a piece of code that gets executed for each element in the array. The collected elements are then returned as a new array.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Tell us what is class libraries in ruby?

1 Answers  


Please explain what are some advantages of using ruby?

1 Answers  


What is mvc? And how it works?

1 Answers  


Explain module mixins in Ruby?

1 Answers  


Explain retry statement in ruby.

1 Answers  


Tell us in ruby, it explains about the defined operator?

1 Answers  


Do you know when self.up and self.down method is used?

1 Answers  


What is retry statement in ruby?

1 Answers  


Which ruby interpreter option enables debugging?

1 Answers  


Tell me what are blocks and procs?

1 Answers  


How to check whether a directory exist or not in Ruby?

1 Answers  


Explain about the programming language ruby?

1 Answers  


Categories