Arrays and Loops
Why do you think arrays in Swift only support a collection of
objects of the same type?
a. Because the array type only refers to the elements in the
arrayHow can you access objects within an array one at a time?
a. Use a “for in” loop to move around in the array.How might you check if an array is empty?
a. Use an isEmpty function
Top comments (0)