I wrote a method that takes an array of numbers, adds the number 2 to it, and then returns an array of strings.
def add_two(array)
new_array = array.map{|x| "#{x} + 2 = #{x + 2}"}
new_array.to_s
end
The following is a test result:
I have an unwanted \
in my return. I am trying to figure out where the \
is coming from. Can someone point me in the right direction?