title: to generate years automatically in javascript dropdown
body: <p>I created javascript that generates years used in my dropdown menu. I want to  display current year and future years automatically. Does anyone know how to implement this?</p>
  
  <pre><code>&lt;select id="selectElementId"&gt;&lt;/select&gt;
  
  &lt;script&gt;
      var min = 2012,
      max = 2021,
      select = document.getElementById('selectElementId');
  
      for (var i = min; i&lt;=max; i++){
         var opt = document.createElement('option');
         opt.value = i;
         opt.innerHTML = i;
         select.appendChild(opt);
      }
  &lt;/script&gt;
  </code></pre>