While the "for in" loop is running, is it possible to look up the value of the next "string"?
Lets say you had an array called myArrayOfStrings that had the following values in it:
0 "Apple" 1 "Pear" 2 "Orange" 3 "Grape"
And you wanted to iterate over the array using a "for in" loop:
for (NSString* string in myArrayOfStrings) { NSLog(string); }
Is there anyway, inside of the "for in" loop to look of the value of the next string while it's running? Lets say it was currently looking at the 1 "Pear" string. Would there be anyway to lookup the value of the next string 2 "Orange"?
for(int i = ...type loop, vs "for in". You can keep your own index with a "for in" loop, but you lose the "connection" that the explicit loop index gives you.