title: Uncaught (in promise) SyntaxError: Unexpected token N in JSON at position 0
body: <p>I have made a small vanilla javascript code to fetch api but it is throwing the error &quot;Uncaught (in promise) SyntaxError: Unexpected token N in JSON at position 0&quot;. I m not able to understand, exactly why the error is caught. Can somebody help me to resolve this.</p>
  <pre><code>const config = {
    url: &quot;https://randomuser.me/&quot;,
    numberCards: 24
  };
  
  fetch(`${config.url}&amp;amount=${config.numberCards}`)
    .then(function(response) {
      return response.json();
    })
    .then(function(apiResponse) {
      // Output API response to console to view.
      console.log(apiResponse);
    });
  </code></pre>