How to store the resultant print in an Array of Integer. I try to append the value in empty array but in the print it shows me empty. Below is the swift code till what i have done.
var num = [Int]()
var filterMenId = ""
if let indexPath = self.colEat.indexPathsForSelectedItems?.first{
filterMenId = self.arrayMeal[indexPath.row].id.description
let convert = Int(filterMenId) // Here i am getting the value, eg: 32
print(num.append(convert!)) // Here i try to append but shows me empty
Array.appendreturnsvoid, which is then printed. You may want to callappendbefore theprintstatement and then justprint(num)orprint (convert!), depending on your needs(), didn't it?()is definitely not empty.