title: Typescript - Loop through an array backwards with noUncheckedIndexedAccess enabled
body: <p>What is the best way to loop through an array backwards in TypeScript, with <code>strict</code> and <code>noUncheckedIndexedAccess</code> options enabled? The most classic approach no longer works well in this config:</p>
  <pre><code>function doSomething(i: number): void {
    ...
  }
  
  const arr = [1, 2, 3];
  for (let i = arr.length - 1; i &gt;= 0; --i) {
    doSomething(arr[i]);
  }
  </code></pre>
  <p>It fails with a compilation error:</p>
  <pre><code>Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
    Type 'undefined' is not assignable to type 'number'.
  </code></pre>