title: How to add ID to all li in list using javascript
body: <pre><code>&lt;ul class="list"&gt;
  &lt;li class="item"&gt;Item 1&lt;/li&gt;
  &lt;li class="item"&gt;Item 2&lt;/li&gt;
  &lt;li class="item"&gt;Item 3&lt;/li&gt;
  &lt;li class="item"&gt;Item 4&lt;/li&gt;
  &lt;li class="item"&gt;Item 5&lt;/li&gt;
  &lt;li class="item"&gt;Item 6&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I want to add ID for all li tags, use pure javascript. I am new, looking forward to helping everyone</p>
  
  <p><a href="http://jsfiddle.net/8XN8j/32/" rel="nofollow noreferrer">http://jsfiddle.net/8XN8j/32/</a></p>