title: How to get certain element (using JavaScript) from HTML with similar classes?
body: <p>How can I get one certain element from HTML using JavaScript.
  I have this code.</p>
  <pre><code>&lt;div class=&quot;Content&quot;&gt; 
  
   &lt;div class=&quot;First Block&quot;&gt;
    &lt;div class=&quot;num&quot;&gt;Text From First Block&lt;/div&gt;
   &lt;/div&gt;
  
   &lt;div class=&quot;Second Block&quot;&gt;
    &lt;div class=&quot;num&quot;&gt;Text From Second Block&lt;/div&gt;
   &lt;/div&gt;
  
   &lt;div class=&quot;Third Block&quot;&gt;
    &lt;div class=&quot;num&quot;&gt;Text Third Second Block&lt;/div&gt;
   &lt;/div&gt;
  
  &lt;/div&gt;
  
  </code></pre>
  <p>I want to write &quot;Text From Second Block&quot;.
  If I write this code</p>
  <pre><code>console.log(document.querySelector('.num').innerText);
  </code></pre>
  <p>I will get &quot;Text From First Block&quot;</p>