title: Identifying the next item in current for of loop iteration Typescript
body: <p>In my TypeScript project, I want to compare the values in an Array with the next value. If I am doing this in JavaScript I would do something like this:</p>
  
  <pre><code>//JS
  for (var i = 0; i &lt; codeBlocks.length; i++) {
      var j = i + 1;
      if (codeBlocks[i] &gt; codeBlocks[j]) {return true;}
      return false;
  }
  </code></pre>
  
  <p>However, I really like the Typescript for of syntax as it is much more readable.</p>
  
  <pre><code>//TS
  for (let codeBlock of codeBlocks) {
      //logic
  }
  </code></pre>
  
  <p>Is there a way of describing the "next iteration" value in the typescript for...of loop?</p>