Please help me complete the missing codes


#1
statements = []
["kittens", "puppies", "piglets"].each do |animal|
  statement = "I love " + animal
  # add the statement to the statements array here.
  ???
end
puts statements

#2

Given an array, Ruby offers two different ways to add items,

array.push(x)

or,

array << x

Use the method suggested in the instructions and lesson text.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.