title: How to modify arrow function to work in IE11
body: <p>I have learned that arrow functions do not work in IE11. So my code below is throwing a syntax error in IE11. However, I'm having difficulty modifying it to a normal function. Here's the problem line of code:</p>
  <pre><code>let selectors = [nextSlide, nextSlide - slick.slideCount, nextSlide + slick.slideCount].map( n =&gt; '[data-slick-index=&quot;${n}&quot;]' ).join(', ');
  </code></pre>
  <p>I tried changing <code>n =&gt;</code> to <code>function(n) {}</code> like below, but that's giving an error in all browsers.</p>
  <pre><code>let selectors = [nextSlide, nextSlide - slick.slideCount, nextSlide + slick.slideCount].map( function(n) { '[data-slick-index=&quot;${n}&quot;]' } ).join(', ');
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>Here's the full function if it's helpful to see what's going on:</p>
  <pre><code>$('.text-slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){
    let selectors = [nextSlide, nextSlide - slick.slideCount, nextSlide + slick.slideCount].map( n =&gt; '[data-slick-index=&quot;${n}&quot;]' ).join(', ');
    $('.shimmer2').removeClass('shimmer2');
    $(selectors).addClass('shimmer2');
  });
  </code></pre>
  <p>Thank you!</p>