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

What is the difference between static and dynamic scaffolding?

1 Answers  


Explain redo statement in Ruby?

1 Answers  


Explain about garbage collection feature of ruby?

1 Answers  


In how many ways you can compare Ruby string?

1 Answers  


Explain class libraries in ruby.

1 Answers  


what is the difference between a gem and a plugin in Ruby?

1 Answers  


Is ruby a statically typed or a dynamically typed language?

1 Answers  


Explain for loop in Ruby?

1 Answers  


Do you know what is the defined operator?

1 Answers  


what is Interpolation in Ruby?

1 Answers  


what is the difference between put and putc statement?

1 Answers  


Explain next statement in ruby.

1 Answers  


Categories