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


Tell me an array [1,2,34,5,6,7,8,9], product it using a method?



Tell me an array [1,2,34,5,6,7,8,9], product it using a method?..

Answer / Amit Ranjan Pandey

"In Ruby, you can multiply each element in the array using the inject method. Example: [1,2,34,5,6,7,8,9].inject(:*) will return 3072000."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Mention what is the command to create a migration?

1 Answers  


How to create a new time instance in Ruby?

1 Answers  


What are Ruby arrays and how they can be created?

1 Answers  


What are freezing string in Ruby?

1 Answers  


Explain retry statement in ruby.

1 Answers  


Tell me what is the command to create a migration?

1 Answers  


What are differences between ruby and python?

1 Answers  


Why Ruby is known as a language of flexibility?

1 Answers  


Explain until loop in ruby.

1 Answers  


what the difference is between false and nil in Ruby?

1 Answers  


Where does a scope change in a ruby program?

1 Answers  


How do you remove nil values in array using ruby?

1 Answers  


Categories