I have a problem that I do not understand
NSArray *emptyArr = @[]; for (int i=0; i < ([emptyArr count]-1) ; i++) { NSLog(@"Did run for1"); }
[emptyArr count] - 1 - -1, but my application still runs the NSLog command!
If I use the int variable:
NSArray *emptyArr = @[]; int count = [emptyArr count]-1; for (int i=0; i < count ; i++) { NSLog(@"Did run for1"); }
then my application does not run the NSLog command.
Someone help me!
source share