Please help me complete the missing codes

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

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



array << x

Use the method suggested in the instructions and lesson text.

1 Like

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