title: how can I know the element is the last item?
body: <p>for example,we have </p>
  
  <pre><code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;....&lt;/ul&gt;
  </code></pre>
  
  <p>we don't know how many li tag in these code and right now i have a reference to one of these li elements.
  is there a simple way to know if this reference is the last item?</p>