Array exemple
[
[
"Francis",
"Chartrand",
"[email protected]"
],
[
"Francis",
"Chartrand",
"[email protected]"
],...
]
Result wanted
"[email protected], [email protected], ..."
My solution (two loop)
array.map{|a| a[2]}.join(", ")
Is it possible to do this with one loop?
jointo be a loop.map/joinis common idiom, don't stray from it.