JavaScript Markdown Table Generator

The code below and the demo will generate a button which reveals a grid of squares which the user can hover over and click to generate a Markdown Table where each square on the horizontal axis is a table column and the vertical axis is a table row.