title: Appending strings within a loop objective-c
body: <p>I have a for-in loop running unknown num of times, when its finished running I want to have all names appending like so: <code>name1, name2,name3</code> and so on.</p>
  
  <p>How do I append the strings within the loop ?</p>
  
  <p>I was thinking of something like this : </p>
  
  <pre><code>if (donePressed)
  {
      NSString *allFriends;
      selectedFriends = friendPicker.selection;
      for (NSDictionary * friend in selectedFriends)
      {
          NSString * friendName = [friend objectForKey:@"name"];
          // some built-in method that appends friendName to allFriends with a ", " between them
      }
  
      NSLog(@"%@",selectedFriends);
  }
  </code></pre>