hello i have this array that compares two arrays to see if it contains an object however after testing it with nslog
NSLog (@"1");
favoritesArray = [[NSMutableArray alloc] init];
NSLog (@"2");
//Add items
// favoritesArray = [[NSMutableArray alloc]init];
didContain = [[NSMutableArray alloc]init];
NSLog (@"3");
if ([favoritesArray containsObject:@"one"])
{
[didContain addObject:@"one"];
NSLog (@"4");
}
the 4th log doesn appear. does this mean my implementation is wrong of the if it contains an object or it means there is no file present like that?
EDIT here is where i add an array
-(IBAction) addToFavorites {
favoritesArray = [[NSMutableArray alloc] init];
[favoritesArray addObject:@"one"];
NSLog (@"hello");
how come this doesnt show up as the object @"one"