DEV Community

suLeeTate
suLeeTate

Posted on

moreInfoCandyForTheBrain

Arrays and Loops

  1. 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
    array

  2. How can you access objects within an array one at a time?
    a. Use a “for in” loop to move around in the array.

  3. How might you check if an array is empty?
    a. Use an isEmpty function

Top comments (0)