title: Is there any difference between '?:' and an if statement in objective c?
body: <p>Is there a difference between using the '?:' conditional and the simple 'if-then-else' statement?  Is it simply another way to do it, or does it actually use less space/take less time to read than 'if' statements?</p>
  
  <p>Example:</p>
  
  <p>If statement:</p>
  
  <pre><code>if (item1.isEqualToString:@"2") //If statement
      [self doSomething];
  else
      [self doSomethingElse];
  
  item1.isEqualToString:@"2" ? [self doSomething] : [self doSomethingElse]; //'?:' statement
  </code></pre>