title: Fetch multiple posts from JSON Placeholder with one API call
body: <p>So, my question is, can you fetch multiple posts from JSON Placeholder API, but call fetch once, and fetch 12 posts for example. This is what I did so far, but when I go into network in inspect element, I get 12 API calls, and I want it to be 1 if it is possible</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const fetchPosts = (id) =&gt; {
    fetch("https://jsonplaceholder.typicode.com/posts/" + id)
      .then(function (response) {
        return response.json();
      })
      .then((json) =&gt; {
        var result = document.querySelector(".wrapper");
        result.innerHTML += "&lt;div class=\"posts\"&gt;" + json.title + "&lt;/div&gt;";
      });
  };
  for(let i = 0; i &lt;= 12; i++) {
      fetchPosts(i);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>