title: Variable not defined issue
body: <p>I try <a href="https://en.wikipedia.org/wiki/Minification_(programming)" rel="nofollow noreferrer">this example</a> given below for looping using for loop in normal js file and in reactjs.</p>
  
  <pre><code>for(var a=[i=0];++i&lt;20;a[i]=i);
  </code></pre>
  
  <p>when i run this code in react it shows</p>
  
  <blockquote>
    <p>'i' is not defined</p>
  </blockquote>
  
  <pre><code>import React, { Component } from 'react';
  import './App.css';
  export default class Board extends Component
  {
  
      move (e)
      {
          for(var a=[i=0];++i&lt;20;a[i]=i);
          console.log(a)
      }
      render () {
          return (
              &lt;div className="boxes" onClick={this.move.bind(this)}&gt;&lt;/div&gt;
          );
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HnpsZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HnpsZ.png" alt="enter image description here"></a></p>
  
  <p>when i run it in the normal js file it works fine.any ideas why it happens in reactjs.</p>