title: Function is showing undefined value but in console its showing result
body: <p>I have two functions one is main function and another one is api calling function in which I am calling Api in this function actually it is showing result in console but when I am calling this function inside main function then its showing <code>undefined</code> value.</p>
  <p>Below  is my code:</p>
  <pre><code>async mainFun(){
  
      this.logger.log(&quot;in main function&quot;);
      const dat = await this.apiFun();
      this.logger.warn(dat);  // Here its showing undefined
  } 
  
  async apiFun = () =&gt;{
      const url = 'https://reqres.in/api/unknown';
      axios.get(url).then((response) =&gt; {
       this.logger.log(&quot;In nameFun &quot; + response.data.total);
       return response.data.total;
      }).catch((error) =&gt; {
         this.logger.log(error);
      });
  }
  </code></pre>
  <p>Someone let me know why its showing <code>undefined</code> value.</p>