title: Retrieve input values in td from table without id
body: <p>I need to retrieve date from the generic input field. The number of how many date (input field) user can create in form is unknown by me, so I count them by rowCount.</p>
  
  <p>I'm not enable to extract the value of field (<strong>Syntax error maybe</strong>).</p>
  
  <p>N.B when I lunch my code I get: <strong>Cannot set property '0' of undefined</strong></p>
  
  <p><strong>html code:</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;table id='dynamic_field_edit'&gt;
           &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;Date&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" placeholder="Enter date" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;Date:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" placeholder="Enter date" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
           &lt;/tbody&gt;   
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS code :</strong>  </p>
  
  <pre><code>var arrayDate = [];
  
      var rowCount = document.getElementById('dynamic_field_edit').rows.length;
      console.log(rowCount);
  
     var allInputs = document.querySelectorAll('input');
      for (let i = 0; i &lt; allInputs.length; i++) {    
         arrayDate.push(allInputs[i].value);
      }
      console.log(arrayDate);
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>After all suggested change it works, but it retrieve all values from input in document.</p>