NSLog(@"%d",[annotations count]);
The above code is used with an NSMutableArray named ‘annotations’.
My question is… what does this code do exactly?
I know NSLog outputs text, and its saying annotations count.. so I am thinking that it outputs the amounts of elements in the annotations array.
Am I correct?
You could have just run the code to test this, but yes this command outputs to
NSLogthe count of the array named “annotations”. For example if the array contains objects and indexes 0,1,2,3, and 4 the array’s count will be 5.For more details, see this post: Size of an NSArray