title: get the last iteration in jquery each
body: <p>I have the following code that I am going through the tables columns and if its the last column I want it to do something different. Right now its hard coded but how can I change so it automatically knows its the last column</p>
  
  <pre><code>$(this).find('td').each(function (i) { 
      if(i &gt; 0) //this one is fine..first column
      { 
          if(i &lt; 4)  // hard coded..I want this to change 
          {
              storageVAR += $(this).find('.'+classTD).val()+',';
          }
          else
          {
              storageVAR += $(this).find('.'+classTD).val();
          }
      }
  });
  </code></pre>