title: promises scope using await and async
body: <pre><code>      var accountA;
         var  accountB;
        accounts = async () =&gt; {
          accountA = await server.loadAccount(Apub)
  
          console.log(accountA)
          accountB = await (server.loadAccount(Bpub))
      }
  
    accounts()
  
    console.log(accountA);
  </code></pre>
  
  <p>1) Apub is my public key which i have already declared </p>
  
  <p>2)when i am printing the  </p>
  
  <blockquote>
    <p>accountA</p>
  </blockquote>
  
  <p>inside the function it is showing me complete details from accountA</p>
  
  <p>3) when i do console.log outside the function, the output is  </p>
  
  <blockquote>
    <p>undefined</p>
  </blockquote>
  
  <p>4) i have declared the variables outside the function as  the global scope  </p>
  
  <p>please help me </p>