title: JSHint error : Functions declared within loops referencing an outer scoped variable may lead to confusing semantics
body: <p>Is it possible to explain why this code snippet throws such an error  ECMA 6 is not an option as of now and I have also tried putting the inner $.each function in a closure IIFE that saves maps the value of i to an inner variable within the closure. Please help !</p>
  
  <pre><code>for(var i = 0; i &lt; cityArray.length; i++) {
      $.each(_cityCards, function(index, item) {
          var cityName = $(this).attr('data-city');
          if(cityName == cityArray[i]) {
              $(this).css('transform','scale(1)').delay(500).show();
          }
      });
  }
  </code></pre>