olve until you stop it, and you
        can draw patterns as you like.
      </h6>
      <canvas id="gridCanvas" width="400" height="400"></canvas>
      <br />
      <button id="startButton">Start</button>
      <button id="clearButton">Clear</button>
    </div>
    <script>
      const canvas = document.getElementById("gridCanvas");
      const ctx = canvas.getContext("2d");
      const rows = 40;
      const cols = 40;
      const cellSize = canvas.width / cols;
      let grid = createEmpty