title: Javascript set const variable inside of a try block
body: <p>Is it possible in <strong>ES6</strong> to set a variable inside of a <code>try{}</code> using <code>const</code> in strict mode?</p>
  
  <pre><code>'use strict';
  
  const path = require('path');
  
  try {
      const configPath = path.resolve(process.cwd(), config);
  } catch(error) {
      //.....
  }
  
  console.log(configPath);
  </code></pre>
  
  <p>This fails to lint because <code>configPath</code> is defined out of scope. The only way this seems to work is by doing:</p>
  
  <pre><code>'use strict';
  
  const path = require('path');
  
  let configPath;
  try {
      configPath = path.resolve(process.cwd(), config);
  } catch(error) {
      //.....   
  }
  
  console.log(configPath);
  </code></pre>
  
  <p>Basically, is there any way to use <code>const</code> instead of <code>let</code> for this case?</p>