title: Expression in FOR command (for (int i=0; i < ([arr count]-1);i++){})
body: <p>I have a problem that I can not understand</p>
  
  <pre><code>NSArray *emptyArr = @[];
  for (int i=0; i &lt; ([emptyArr count]-1) ; i++) {
      NSLog(@"Did run for1");
  }
  </code></pre>
  
  <p><code>[emptyArr count]</code> - 1 is -1 but my app still runs <code>NSLog</code> command!</p>
  
  <p>If I use a int variable:</p>
  
  <pre><code>NSArray *emptyArr = @[];
  int count = [emptyArr count]-1;
  for (int i=0; i &lt; count ; i++) {
      NSLog(@"Did run for1");
  }
  </code></pre>
  
  <p>then my app doesn't run <code>NSLog</code> command.</p>
  
  <p>Anyone help me please!</p>