With the below my whole dynamic array outputs, 10 per line - I would like to setup a param to have 3 array items per line, after 3 another line is created.
...
while i < arr.length
print "Define types of coffee drinks: "
coffee = gets.chomp
arr[i] = coffee
i += 1
end
puts arr.join(", ")
break
...
For instance after my dynamic array is created it outputs like:
black iced coffee, cold brew, espresso, flat white, frap, latte, drip, fancy, smancy
All 10 on one line, I'd like it to output like:
black iced coffee, cold brew, espresso,
flat white, frap, latte,
drip, fancy, smancy