Given the following code example, is the newMutableArrray variable different depending on the two different initializations, or the same?
NSArray *originalArray = @[obj1, obj2, oj3];
NSMutableArray *newMutableArray = nil;
if (thereIsSomeDifference) {
newMutableArray = [NSMutableArray arrayWithArray:originalArray];
}
else {
newMutableArray = [originalArray mutableCopy];
}
thereIsSomeDifference?thereIsSomeDifferenceis the hypothetical condition for which I would want to initialize newMutableArray one or the other way. This is the essence of the question, because if there is no difference, as your answer indicates, thethereIsSomeDifferencecondition does not exist.