JSFiddle - React, Tailwind, and code Playground

by VVetya

HTML

<table id="thisTable" onclick="tryit()"><tr><td>Click me</td></tr></table>

CSS

.table{
  border:1;
}

JavaScript

//Click on the text to try it out!

thisArray=[["row 1, cell 1__", "row 2, cell 2--"], ["row 2, cell 1__", "row 2, cell 2"]];

function tryit(){document.getElementById("thisTable").innerHTML="<tr><td>"+String(thisArray).replace(/--,/g,"</td></tr><tr><td>").replace(/__,/g,"</td><td>");}