title: why do I got Uncaught TypeError: response.text is not a function" error when try to assignt body received as text to a variable in javascript
body: <p>I got a mock server who responds with a body text like this: "2020-05-02 2020-05-05 2020-05-07 2020-05-15 2020-05-16" then I try to insert each o these elements in an javascript array using this func:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
          let response = fetch("http://127.0.0.1:35980/returnBalancesDates")
          let value =  response.text();
          var choices =  value.split(' ');
          console.log(choices)
          var x = document.createElement("SELECT");
          x.setAttribute("id", "mySelect");
          x.setAttribute("name", "oldbaldate");
          document.body.appendChild(x);
  
          for (i = 0; i &lt; choices.length; i = i + 1) {
              var z = document.createElement("option");
              z.setAttribute("value", choices[i]);
              var t = document.createTextNode(choices[i]);
              z.appendChild(t);
              document.getElementById("mySelect").appendChild(z);
          }
          $(x).appendTo('#selectOldBalance');
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>In browser console I see this error and my select element is not created in html page:</p>
  
  <pre><code>Uncaught TypeError: response.text is not a function
      at HTMLDocument.&lt;anonymous&gt; ((index):75)
      at e (jquery.min.js:2)
      at t (jquery.min.js:2)
  </code></pre>