Asked • 05/30/19

How do I create an average from a Ruby array?

How would get find an average from an array?If I have the array: [0,4,8,2,5,0,2,6]Averaging would give me 3.375.Thanks!

1 Expert Answer


Fernando G. answered • 03/17/20

New to Wyzant

Ruby and JavaScript Web Developer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.