title: Add values to array using for loop in JavaScript
body: <p>I know this is a simple issue, but I am stumped.</p>
  <p>I want to do this using a for loop in JavaScript</p>
  <pre><code>      var arr = [
          { val: '1', text: '1' },
          { val: '2', text: '2' },
          { val: '3', text: '3' },
         .........
          { val: '30', text: '30' },
          { val: '31', text: '31' }
         ];
  </code></pre>
  <p>I tried this. I want create a select list which shows all month day</p>
  <pre><code>    var arr = [
          for (var i = 0; i &lt; 32; i++) {
               { val: i, text: i },
          }
      ];
  </code></pre>
  <p>This shows error.</p>