title: Naming Lots of Input Checkboxes with a Counter
body: <p>This is a pretty straightforward question, but I wasn't able to find the answer to it.</p>
  
  <p>Is it possible to do something like this with JavaScript and HTML?  So below the names of the checkboxes in order would be 1, 2, 3, 4</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;input type="checkbox" name=counter()&gt;
  &lt;input type="checkbox" name=counter()&gt;
  &lt;input type="checkbox" name=counter()&gt;
  &lt;input type="checkbox" name=counter()&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>function counter() {
    i++;
    return i;
  }
  </code></pre>