title: Async function inside a class
body: <p>I get this error when I try to run an async function described in a class</p>
  
  <p><strong>masterClass.js</strong></p>
  
  <pre><code>class MasterClass{
  
    async function updateData(a, b){
      let [ res1, res2 ] = await Promise.all(call1, call2);
      return  [ res1, res2 ]
    }
  
  }
  </code></pre>
  
  <p><strong>test.js</strong></p>
  
  <pre><code>const MasterClass =  require('./MasterClass.js')
  let m = new MasterClass()
  m.updateData(a, b)
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>async function updateData(a, b){
                   ^^^^^^^^^^
  SyntaxError: Unexpected identifier
  </code></pre>