title: how can I access to a variable in try block in other try block?
body: <p><a href="http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/" rel="noreferrer">http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/</a> In this link, there are some codes that access to a variable in try catch but when I try this in my server It doesn't work because It's out of scope. how can I do this?</p>
  
  <pre><code>try {
    const foo = "bar"
  } catch (e) {
    console.log(e)
  }
  
  try {
    console.log(foo) -&gt; is not defined
  } catch (e) {
    console.log(e)
  }
  </code></pre>