title: Uncaught TypeError: Cannot set property 'text' of undefined
body: <p>I am getting an error "Uncaught TypeError: Cannot set property 'text' of undefined" on running the following</p>
  
  <pre><code>var years= new Array(113);
  for(i=0;i&lt;113;i++){
  years[i]["text"]=i+1900;
  years[i]["value"]=i+1900;
  }
  </code></pre>
  
  <p>Basically, I want something like this to be generated with a loop</p>
  
  <pre><code>var years= [
          { text: "1990", value: 1990, },
          { text: "1991", value: 1991, }, //till 2012
  ];
  </code></pre>
  
  <p>Any help?</p>