Get each li value with a specific class name
<p>Assume I have a body such as;</p>

<pre><code>&lt;div class="body"&gt;
    &lt;ul&gt;
        &lt;li class="01"&gt;hi&lt;/li&gt;
        &lt;li class="02"&gt;bye&lt;/li&gt;
        &lt;li class="03"&gt;go&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul style=""&gt;
        &lt;li class="01"&gt;hi2&lt;/li&gt;
        &lt;li class="02"&gt;bye2&lt;/li&gt;
        &lt;li class="03"&gt;go2&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I want to get each <code>class = "01", class = "02" and class = "03"</code> values of each <code>ul</code>. </p>

<p>What I did so far?</p>

<pre><code>$('.body ul').each(function(element)
{
   console.log(this);
});
</code></pre>

<p>It printed the each li element but how can I reach the values in class 01,02 and 03?</p>

<p>I want to get </p>

<p>hi bye go
hi2 bye2 go2</p>

<p>while looping inside the body</p>