Exercise 3: Make an Expression
Explore how to manipulate arrays in Ruby by creating expressions from their elements with plus signs. This lesson helps you practice and understand array handling and string creation using built-in classes in Ruby.
We'll cover the following...
We'll cover the following...
Problem statement
Given an array of numbers, display an expression containing the elements in the array separated by the + symbol.
Example
input_array = [1, 2, 3, 4, 5]
result = 1+2+3+4+5