JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>What did I do today?</title>
</head>
<body>
<form onsubmit="saveResponses()">
<h3>My name is...</h3>
<textarea rows=2 cols=25 name="text"></textarea>
<br><br>
Please select the appropriate response.
<table width="660" border>
<tr align="center">
<td width="500"></td>
<td width="50">1</td>
<td width="50">2</td>
<td width="50">3</td>
<td width="50">4</td>
</tr>
<tr align="center">
<td width="500">I brushed my teeth today.</td>
<td><input type="checkbox" value="1"></td>
<td><input type="checkbox" value="2"></td>
<td><input type="checkbox" value="3"></td>
<td><input type="checkbox" value="4"></td>
</tr>
<tr align="center">
<td width="500">I washed my hands today.</td>
<td><input type="checkbox" value="1"></td>
<td><input type="checkbox" value="2"></td>
<td><input type="checkbox" value="3"></td>
<td><input type="checkbox" value="4"></td>
</tr>
<tr align="center">
<td width="500">I ate all of my vegetables today.</td>
<td><input type="checkbox" value="1"></td>
<td><input type="checkbox" value="2"></td>
<td><input type="checkbox" value="3"></td>
<td><input type="checkbox" value="4"></td>
</tr>
<tr align="center">
<td width="500">I fed the fish this week.</td>
<td><input type="checkbox" value="1"></td>
<td><input type="checkbox" value="2"></td>
<td><input type="checkbox" value="3"></td>
<td><input type="checkbox" value="4"></td>
</tr>
</table>
<br>
<input type="submit" value="SAVE">
</form>
<script type="text/javascript">
// StackOverflow question https://stackoverflow.com/questions/65084239
function saveResponses() {
// Windows-safe filename
var name = document.getElementsByTagName('textarea')[0].value.replace(/[<>:"/\|?*]/g, ' ') + '.txt';
var responses = [];
var questions =...