title: Insert image into table cell in Javascript
body: <p>I want to insert images to the new cell just created. How can I do it? Can anyone guide me in doing it?
  Here's my code to insertcells:</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-html lang-html prettyprint-override"><code>  &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;script&gt;
      function displayResult()
      {
      var firstRow=document.getElementById("myTable").rows[0];
      var x=firstRow.insertCell(-1);
      x.innerHTML="New cell"
      }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      
      &lt;table id="myTable" border="1"&gt;
        &lt;tr&gt;
          &lt;td&gt;First cell&lt;/td&gt;
          &lt;td&gt;Second cell&lt;/td&gt;
          &lt;td&gt;Third cell&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
      &lt;button type="button" onclick="displayResult()"&gt;Insert cell&lt;/button&gt;
      
      &lt;/body&gt;
      &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>All I want is to insert image in the cell created.</p>