lundi 9 novembre 2015

Removing outer brackets from an array

arr = Array.new
arr = [ "172" , "173"]
arr = arr.join(" , " )   
puts arr

The output is 172, 173, however, I want the output to look like "172", "173".

Aucun commentaire:

Enregistrer un commentaire