title: variable value not changing inside axios then method
body: <pre><code>let found = false;
  axios
     .get(link)
     .then((response) =&gt; {
        response.data.map((element) =&gt; {
           if (element.id_ticket.toString() === nbTicket) found = true;
        });
        console.log(found);
     });
  </code></pre>
  <p>so im trying to get data from the api and see if the value of 'nbTicket' is in the returned data and that is done using the 'found' variable so if i log the 'found' variable value outside the .then method it stays false even if the value exists and when i do it iside the .then methods it gives the correct value</p>
  <pre><code>let found = false;
  axios
     .get(link)
     .then((response) =&gt; {
        response.data.map((element) =&gt; {
           if (element.id_ticket.toString() === nbTicket) found = true;
        });
     });
     console.log(found);
  </code></pre>