text: const clear = document.getElementById("clear");
  const save = document.getElementById("save");
  const create = document.getElementById("new");
  var text = document.getElementById("text");
  var number = document.getElementById("number");
  var string = " ";
  
  function clearText() {
      text.value = '';
  }
  
  function saveFile(){
      var blob = new Blob([text.value], { type: "text/plain"});
      var anchor = document.createElement("a");
      anchor.download = "file.json";
      anchor.href = window.URL.createObjectURL(blob);
      anchor.target ="_blank";
      anchor.style.display = "none"; // just to be safe!
      document.body.appendChild(anchor);
      anchor.click();
      document.body.removeChild(anchor);
  }
  
  function* range(start, end) {
      for (let i = start; i <= end; i++) {
          yield i;
      }
  }
  
  function convertText() {
      string = JSON.stringify(text.value);
      text.value = "";
      for (i of range(1, number.value)) {
          document.getElementById('text').value += string;
      }
  }