Convert an array of Ints to a comma separated string [duplicate] Convert an array of Ints to a comma separated string [duplicate] swift swift

Convert an array of Ints to a comma separated string [duplicate]


Well you can do it like :

let formattedArray = ([0,1,1,0].map{String($0)}).joined(separator: ",")