title: Create javascript object containing # of days in a given month
body: <p>I have the following code, which returns the number of days in a month:</p>
  
  <pre><code>daysInMonth(month:number, year:number) {
              return new Date(year, month, 0).getDate();
  }
  </code></pre>
  
  <p>Let's say this gives me <code>31</code>. Now, in my html, I want to create a <code>dropdown</code> element with all the days in the month, listed out in order. So, my dropdown would consist of:</p>
  
  <p><code>1,2,3,4,5,6,7,8,9,10,11.....</code> All the way to <code>31</code>.</p>
  
  <p>I need to build this object dynamically since the days in the month will change based on the month.</p>
  
  <p>What's the most efficient way to do that?</p>