title: MomentJS plus Map deprecacted error
body: <p>I'm trying to use momentjs so I can format the date correctly, but I got this warning when I <code>console.log()</code> the result. Please see my code below:</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>var selectedTargetDate = $('select').val();
  var startDate = moment(selectedTargetDate.split(' - ')[0]).format('YYYY-MM-DD');
  var endDate = moment(selectedTargetDate.split(' - ')[1]).format('YYYY-MM-DD');
  
  var getDaysArray = function(start, end){
     for(var arr=[], dt=start; dt&lt;=end; dt.setDate(dt.getDate()+1)){
        arr.push(new Date(dt));
     }
     return arr;
  };
  
  var daylist = getDaysArray(new Date(startDate),new Date(endDate));
  
  daylist = daylist.map((v) =&gt; moment(v.toDateString()).format('DD MMM'));
  
  console.log(daylist);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
  
    &lt;select&gt;
      &lt;option value="08/27/2018 - 08/31/2018"&gt;08/27/2018 - 08/31/2018&lt;/option&gt;
      &lt;option value="09/10/2018 - 09/14/2018"&gt;09/10/2018 - 09/14/2018&lt;/option&gt;
    &lt;/select&gt;
  
  &lt;/div&gt;
  
  
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>