title: Why is the Uncaught TypeError: Cannot set property 'innerHTML' of null showing even though the id are the same in <span> and js?
body: <p>HTML:</p>
  <pre><code>&lt;span id=“customer-name”&gt; customer &lt;/span&gt;
  </code></pre>
  <p><img src="https://i.stack.imgur.com/i5p7V.png" alt="enter image description here" /></p>
  <p>Js:</p>
  <pre><code>var customerName = &quot;Harry&quot;;
  document.getElementById(&quot;customer-name&quot;).innerHTML = customerName;
  </code></pre>