title: why does `innerText` property does not work?
body: <p>Why does <code>var a = e.target.innerText</code> does not work but if I set <code>var a = e.target</code> and then do <code>if(a.innerText == &quot;&quot;)</code> it works. Here is a <a href="https://jsfiddle.net/kv8ma4og/1/" rel="nofollow noreferrer">JS Fiddle</a> of my code and a snippet bellow:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let boxes = document.querySelectorAll(".boxes");
  const turn = "X";
  
  boxes.forEach((e) =&gt; {
    e.addEventListener("click", (e) =&gt; {
      var a = e.target.innerText;
  
      if (a == "") {
        a = turn;
      }
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
  
  .main-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .boxes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 2px solid black;
    margin: 4px;
    font-size: 3em;
    vertical-align: bottom;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="main-container"&gt;
          &lt;div class="container"&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;&lt;br&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;&lt;br&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
              &lt;div class="boxes"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>