title: Why in PowerShell: for ($i=0; -le $total-1; $i++) instead of for ($i=0; -lt $total; $i++)
body: <p>I'm looking at some code examples on powershellpro.com and don't understand why he wrote sample code that loops through an array by:</p>
  
  <p>...having an increment start at zero then increase by one until it is less than or equal to the length of an array minus one...</p>
  
  <pre><code>for ($i=0; $i -le $total-1; $i++)
  </code></pre>
  
  <p>...instead of having the increment start at zero then increase by one until it is less than the length of the array...</p>
  
  <pre><code>for ($i=0; $i -lt $total; $i++)
  </code></pre>
  
  <p>Am I missing something? They are functionally equivalent and will both loop through each item in the array. Personally I think the second version is cleaner. Is there a best practice or something that says you should use the first one?</p>