title: warning : function declared in a loop contains unsafe references to variable(s) ''
body: <pre><code>for (let i = 0; i &lt; state.columns.length; i++) {
    var column = state.columns[i];
    var sortIndex;
    var fsColumn = firstSortColumns.find((v, i) =&gt; {
      sortIndex = i;
      return v.dataField === column.dataField;
    });
    if (fsColumn) {
      //...
    } else {
      //...
    }
  }
  </code></pre>
  <p>Function declared in a loop contains unsafe references to variable(s) 'sortIndex', 'column'.</p>
  <p>I am getting a warning like this, how can i fix this?</p>