Create table from html on Expo Print

Hello! I need to create a table on a pdf generated with expo print. But I can’t fill the table with the array that I have on javascript. How can I do it?

<table id="table" class="table is-bordered itens">
              <thead>
               <tr>
                 <th>Item 1</th>
                 <th>Item 2</th>
                 <th>Item 3</th>
               </tr>
               </thead>
             <tbody>
                   <tr>
                     <td></td>
                     <td></td>
                     <td></td>
                   </tr>
             </tbody>
</table>
<script>
  var array = [["A1","B1","C1"],
               ["A2","B2","C2"],
               ["A3","B3","C3"],
               ["A4","B4","C4"],
               ["A5","B5","C5"],
               ["A1","B1","C1"],
               ["A2","B2","C2"],
               ["A3","B3","C3"],
               ["A4","B4","C4"],
               ["A5","B5","C5"]],
   table = document.getElementById("table");
   for(var i = 0; i < array.length; i++)
     {
       var newRow = table.insertRow(table.length);
         for(var j = 0; j < array[i].length; j++)
           {
             var cell = newRow.insertCell(j);
             cell.innerHTML = array[i][j];
           }
     }
</script>

Apparently the code inside is not accessed/working.