更新时间:2023-02-03 09:03:37
[10,20,50,99]地图(安培;。检查)。加入(,)#=> '10,20,50,99
I have an array:
array = ["10", "20", "50", "99"]
and want to convert it into a simple comma-separated string list like this:
"10", "20", "50", "99"
["10", "20", "50","99"].map(&:inspect).join(', ') # => '"10", "20", "50", "99"'