title: Is it necessary to var scope loop variables in CFScript?
body: <p>When using CFML and CF9 I usually var scope my loop variables; in this case <code>local.i</code>, for example:</p>
  
  <pre><code>&lt;cfloop list="#this.list#" index="local.i"&gt;
    &lt;cfif Len(local.i) GT 10&gt;
      // do something
    &lt;/cfif&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p>I recently started converting some stuff into CFScript, and (to my disappointment I found out that there is no way to loop over a list in CFScript) I'm wondering if I should still var scope my loop variables, and how:</p>
  
  <pre><code>for (i = 1; LTE ListLen(this.list); i = i + 1 ) {
    if (Len(ListGetAt(this.list, i) GT 10)) {
      // do something
    }
  }
  </code></pre>
  
  <p>Should I be doing <code>local.i = 1</code> and <code>local.i = local.i + 1</code> istead of the sample code in my example? Is it necessary?</p>
  
  <p><strong>EDIT</strong>: I should also ask if the CFScript form of my CFML loop is correct; I ask because I just noticed that my CFML loop uses a <code>,</code> (comma and space) for the <code>delimiter</code> argument, which seems non-existence in the CFScript version of the loop.</p>