title: getElementById(array[x])?
body: <p>I'm trying to put an array in to getElementById for a loop purpose. It seems to be not working, how can I do this?</p>
  
  <p>Edit: Sorry folks It says undefined.</p>
  
  <pre><code>    var lol=new Array( "test", "test2" );
  
  var x = 0;
  while( x == 4 ) {
      number = parseInt(document.getElementById(lol[x]).value);
      x++;
  }
  </code></pre>
  
  <p>And i have inputs id named test and test2.</p>