tById("squareColor");
      bgC.addEventListener("change", function () {
        color = event.target.value;
        draw(color);
      });

      document.getElementById("save").addEventListener("click", function () {
        let dataURL = canvas.toDataURL();
        document.getElementById("holder").src = dataURL;
      });

      function draw(color) {
        ctx.fillStyle = color;
        ctx.fillRect(70, 70, 100, 100);
      }
    </script>
  </body>
</html>
