Ruby Developer Question:
Tell me an array [1,2,34,5,6,7,8,9], product it using a method?
Answer:
def productarray()
return array.inject(:*)
end
return array.inject(:*)
end
Previous Question | Next Question |
Please explain what is MVC and why do we use it? | Please explain each of the following operators and how and when they should be used: ==, ===, eql?, equal? |