<commit_before># Concatenate Two Arrays

# I worked on this challenge [by myself, with: ].


# Your Solution Below

def array_concat(array_1, array_2)
  # Your code here
  return Array.new if array_1.empty? && array_2.empty?
  combine_array(array_1, array_2)
#  concat(array_1, array_2)
#  concat_with_arrow(array_1, array_2)
# new_array = array_1 + array_2
# return new_array
end

#created new method to combine the array
def combine_array(array1, array2)
  new_array = array1 + array2
end

#uses .concat
def concat(array1, array2)
  array1.concat(array2)
end

#uses the <<
def concat_with_arrow(array1, array2)
  array1 << array2.join.to_i
end<commit_msg>Add iteration<commit_after># Concatenate Two Arrays

# I worked on this challenge [by myself, with: ].


# Your Solution Below

def array_concat(array_1, array_2)
  # Your code here
  return Array.new if array_1.empty? && array_2.empty?
#  combine_array(array_1, array_2)
#  concat(array_1, array_2)
#  concat_with_arrow(array_1, array_2)
# new_array = array_1 + array_2
# return new_array
  iteration(array_1, array_2)
end

#iteration
def iteration(a1, a2)
  new_array = Array.new
  a1.each do |w|
    new_array << w
  end
  a2.each do |w|
    new_array << w
  end
  return new_array
end
=begin Start commenting out
#created new method to combine the array
 def combine_array(array1, array2)
  new_array = array1 + array2
end

#uses .concat
def concat(array1, array2)
  array1.concat(array2)
end

#uses the <<
def concat_with_arrow(array1, array2)
  array1 << array2.join.to_i
end
=end #end commenting out
{'fraction_non_alphanumeric': 0.0927703134996801, 'fraction_numerical': 0.0345489443378119, 'mean_word_length': 4.546099290780142, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5551110', 'n_tokens_mistral': 595, 'n_tokens_neox': 589, 'n_words': 165}