I understand the array.count ( the number of elements in the array ). count is useful to iterate over the array\'s elements. I sort of get the gist of array.capacit
What is the use of an array capacity
Basically, the array capacity has no external use. It is there for Swift's internal use. If you know that you will be allocating 100 objects to this array, you could set the capacity in advance as you create the array, and I have seen some people do that in their code; but there is no particular need to do so and no particular gain in doing so. You've looked under the hood and seen something you didn't really need to see. Now that you've seen, you can forget about it.