Ruby - Enumerable and Collection Processing
Which of the following is the correct syntax to sum all elements in an array
arr using inject?arr using inject?inject(0) { |sum, n| sum + n }.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions