title: why javascript fat arrow function definition works different than regular
body: <p>When I use console.log to print 'this' in console, regular function print DOM element whereas fat function prints 'Window' element. Why is that so?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    // case 1
      $('.test').each(function(){
     console.log(this);
        return 0;
      });
  
      // case 2
      $('.test').each(()=&gt;{
     console.log(this);
        return 0;
      });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="test"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>