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

How does ruby deal with extremely large numbers?

1 Answers  


Can you please explain what is the difference between string and symbol?

1 Answers  


How an exception is handled in Ruby?

1 Answers  


Can you list out the few features of ruby?

1 Answers  


Difference between nil and false in ruby?

1 Answers  


How to use ruby methods.

1 Answers  


What does irb stand for?

1 Answers  


What is ruby methods?

1 Answers  


what is class libraries in Ruby?

1 Answers  


Explain Ruby exceptions?

1 Answers  


Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


List some features of ruby?

1 Answers  


Categories