title: Return the lowest number in an array
body: <p>Without knowing the range and when the array is unordered, so there is no need to sort the array ascendingly and get the first element</p>
  
  <p>So I have this method: </p>
  
  <pre><code>- (NSInteger) lowestNumberInArray:(NSArray *)arrayOfNumbers {
  </code></pre>
  
  <p>Parameter:    array of NSNumbers </p>
  
  <p>Return:       The lowest number in the array as an NSInteger</p>
  
  <p>I am thinking of a for loop that loops through the array, once the lowest number is found then store that number into a NSInteger. However, I don't know the range of the array values aka I don't know what's my biggest and lowest number. I looked into NSArray and NSMutableArray documentation and didn't find any method that I can use to return the smallest value. Your help will be greatly appreciated! :)</p>
  
  <pre><code>- (NSInteger) lowestNumberInArray:(NSArray *)arrayOfNumbers {
  
      smallest = equalBiggestNumber;
      for (NSInteger i = 0; i &lt; arrayOfNumbers.count; i++) {
          if (arrayOfNumbers[i] &lt; smallest) {
              smallest = arrayOfNumbers[i];
          }
  
      return 0;
  }
  </code></pre>