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 |
How does ruby deal with extremely large numbers?
Can you please explain what is the difference between string and symbol?
How an exception is handled in Ruby?
Can you list out the few features of ruby?
Difference between nil and false in ruby?
How to use ruby methods.
What does irb stand for?
What is ruby methods?
what is class libraries in Ruby?
Explain Ruby exceptions?
Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?
List some features of ruby?