title: How to display superscript dynamic values in dynamically created table using javascript
body: <pre><code>&lt;script&gt;
      var a = new Array();
      var table1 = document.createElement('table');
      for(i=0;i&lt;10;i++)
      {
          j = i.toString();
          a = 2+j.sup();
      }
  
      for(tableIndex=0;tableIndex&lt;10;tableIndex++)
      {
          var td1 = document.createElement('td');
          var text1 = document.createTextNode(a[tableIndex]);                         
          td1.appendChild(text1);                             
          tr.appendChild(td1);                                
          td1.style.borderStyle = "solid";
          td1.style.padding = "10px";
      }
      table1.appendChild(tr);
  &lt;/script&gt;
  </code></pre>
  
  <p>In this script, I have created dynamic table and i want value inside row to be superscript of 2.But it is not getting displayed properly,it shows something like "2 sup 0 sup close" tags.</p>