Contact: aviboots(AT)netvision.net.il
39,885 questions
51,811 answers
573 users
var arr:[Int] = [6, 8, 1, 23, 973, "a"] print(arr) /* run: swift:1:36: error: cannot convert value of type 'String' to expected element type 'Int' var arr:[Int] = [6, 8, 1, 23, 973, "a"] */
var arr:[Int] = [6, 8, 1, 23, 973] print(arr) for item in arr { print(item) } /* run: [6, 8, 1, 23, 973] 6 8 1 23 973 */