title: Using var to intentionally leak a variable
body: <p>Is the following pattern ok in javascript, or is this frowned upon? And if the latter, what would be a better approach?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function arithmetic_sum(n) {
      for (var [i, sum] = [0, 0]; i &lt;= n; sum += i++);
      return sum;
  }
  
  console.log(arithmetic_sum(10));
  // 55</code></pre>
  </div>
  </div>
  </p>