title: javascript cannot access 'a' before initialization
body: <pre><code>r = {
    name:'Bart',
    location:'Springfield' 
  }
  
  for(var a in r) {
    if (r.hasOwnProperty(a)) {
        console.log(a);
        const {a} = r[a]; // Here's where it's  failing.
        //I'm trying to do the equivalent of const{name} = r[a];
    }
  }
  
  console.log(name) //Expecting output `Bart`
  </code></pre>
  <p>In my attempt to destructure an object, I've attempted what's above. However, this gives me 'Uncaught ReferenceError: Cannot access 'a' before initialization`</p>
  <p>Do you see any way using which this could be solved?</p>