title: Shift is not a function in javascript
body: <p>I have multiple tables(with same structure)in my html. They are in tabs. I am creating tabs dynamically and i want to send those table data to the mysql database. So i wanted to get those data using javascript. I am correctly created <strong>TableData1,TableData2....</strong> arrays using for loop. Problem is I cannot increment <strong>TableData</strong> here <strong>('TableData'+i).shift();</strong> . I am getting an error. I want to create <strong>TableData1.shift(),TableData2.shift().....</strong></p>
  
  <pre><code>function myDataSendFunction(){
  var i;
  
       for(i = 1; i &lt;= array_size; i++){
           eval("var TableData"+i+"=[];");
  
        $('#mytable'+i+ ' tr').each(function(row, tr){
            ('TableData'+i)[row]={
                "colum1" : $(tr).find('td:eq(1)').text()
                , "colum2" :$(tr).find('td:eq(2)').text()
                , "colum3" : $(tr).find('td:eq(3)').text()
                , "colum4" : $(tr).find('td:eq(4)').text()
                , "colum5" : $(tr).find('td:eq(5)').text()
                , "colum6" : $(tr).find('td:eq(6)').text()
                , "colum7" : $(tr).find('td:eq(7)').text()
                , "colum8" : $(tr).find('td:eq(8)').text()
            }
        }); 
  
          ('TableData'+i).shift(); 
  
      }
  
  }
  </code></pre>
  
  <p>I am getting this error.</p>
  
  <pre><code>Uncaught TypeError: ("TableData" + i).shift is not a function
      at myDataSendFunction (&lt;anonymous&gt;:25:25)
      at HTMLInputElement.onclick (create.php:1)
  </code></pre>