When my array is being printed the entries are bing printed on the same line. I have tried \n command in a couple of ways but I have not gotten it to work. I just want to print 1 array entry on 1 line then move to the next line. pic of array printed out
var arrayOfInt = [Int]()
let cars = arrayOfInt.map { "car \($0)" }
label.text = String(describing: cars)
Have you tried this ?
label.text = arrayOfInt.map { "car \($0)" }.joined(separator:"\n")