title: How to pass a variable with url on javascript fetch() method?
body: <p>I'm trying to fetch data from URL with GET method on javascript,</p>
  <pre><code>fetch('/api/staffattendance/{makedate}')
    .then(res =&gt; res.json())
    .then(res =&gt; {
      //this.staffs = res.data;
      console.log(res.data);
    })
    .catch(err =&gt; console.log(err));
  </code></pre>
  <p>How can I pass the variable here:</p>
  <pre><code>fetch('/api/staffattendance/{makedate}')
  </code></pre>
  <p>Like this</p>
  <p><a href="https://i.stack.imgur.com/cQuOx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cQuOx.png" alt="enter image description here" /></a></p>
  <p>Thanks in Advance,</p>