jQuery underscore as first arg of function
<p>I have the following code snippet:</p>

<p>MARKUP:</p>

<pre><code>&lt;tr name="tr3" id="tr3"&gt;
    &lt;td&gt;
        &lt;input type="text" class="common_cls" name="dt[]" id="dt1"&gt; 
    &lt;/td&gt;
    &lt;td&gt;
        &lt;input type="hidden" name="fn[]" id="fn1"&gt;
        &lt;span id="sp1"&gt;&lt;a href="#" id="ah1"&gt;choose file&lt;/a&gt;&lt;span&gt;
        &lt;input type="file" name="fff[]" id="ff"&gt;
        &lt;input type="text" style="display:none"&gt;
    &lt;/td&gt;
&lt;/tr&gt;';
</code></pre>

<p>JAVASCRIPT</p>

<pre><code>$(document).on('click', '#add_row', function() {
    var row = $("table#DocTable tr:eq(3)");
    row.clone(true)
        .show()
        .find("a, input, span").each(function() {
            $(this)
                .val('')
                .attr('id', function(_, id) {
                    var newcnt = id + count;
                    return id + count;
                });
        })
        .end()
        .appendTo("table");
    count++;
</code></pre>

<p>I wrote this over a year ago and I had assistance with the bit in question.</p>

<p>What is the purpose of the underscore as the first argument of the function called in the .attr method?</p>

<p>How exactly does that function work? Does it just replace the current <code>id</code> in all <code>a</code>, <code>span</code> and <code>input</code> tags with an incremented number?</p>
