title: Destructuring assignment appears to affect variable that occurs before it, during an async call
body: <p>I have the following event handler inside a React class component.</p>
  <pre><code>    eventHandler = async location =&gt; {
          console.log(&quot;Location is:&quot;, location) // location is displayed as expected
          
          this.setState({}, async () =&gt; {
              console.log('Location is', location); // location is undefined
              const {location, weather, temperature } = {'location':'Laos'};
              console.log('location is', location); // location is displayed as expected (Laos)
          });
      };
  </code></pre>
  <p>I notice that location becomes undefined because of the destructuring assignment in the next line. Reassigning the variable to 'place' in the destructuring like so <code>const {location:place, weather, temperature } = {}</code>, fixes the issue.</p>
  <p>I would like to understand why the destructuring statement affects that variable at all, in code that appears before the destructuring occurs.</p>